Commit Graph

10 Commits (55d1f69b938dfa1a578e4d44e575a55d8e679338)

Author SHA1 Message Date
David Barragán Merino 8dbd3df40e Update copyright 2017-02-20 17:58:01 +01:00
David Barragán Merino 998022c3ba [Backport] Apply PEP-263 to taiga project 2016-05-31 11:56:15 +02:00
Andrey Antukh f44414055d Add alejandro.alonso copyright preamble to the settings source files. 2016-01-08 16:09:24 +02:00
Andrey Antukh 327f6590ba Fix my email on copyright preamble on settings source files. 2016-01-08 15:58:30 +02:00
David Barragán Merino f992d372df Update license message 2016-01-04 08:51:06 +01:00
David Barragán Merino 9b56a414f0 Fix dates in license messages. Change 2014 to 2014-2015 2015-10-13 11:27:15 +02:00
Anler Hp 0e414267db Integration with RabbitMQ and Celery
First update taiga-vagrant vm if you're using it, you will have access
to the rabbit management console at port 8001 of the host machine.

* Defining tasks
- Tasks must be defined in a `deferred` module of an app, for example,
`taiga.projects.deferred` module.
- Tasks must be decorated and given the name "<app>.<task-name>", for
example in `taiga.projects.deferred` module:
```
from taiga.celery import app

@app.task(name="projects.add")
def add(x, y):
    return x + y
```
- Tasks should be at most just wrappers around service functions to
promote re-usability of those functions from other parts of the code,
say, management commands and the like.

* Calling tasks
Tasks should be called using one of the three functions defined in
`taiga.deferred` module:

- `defer`: Use this function if you need to perform some task
asynchronously and GET THE RESULT back later, for example:
```
result = defer("projects.add", x=1, y=2)
...
result.get() # => 3
```

- `call_async`: Use this function when you want to fire off some
task. No result is get back. For example:
```
call_async("projects.email_user", user)
```

- `apply_async`: Is the same as `call_async` but since it's a function
application and you must pass the args and kwargs together as one
parameter each you are allowed to pass celery-specific
extra-options (but bear in mind this is not recommended!)
```
apply_async("projects.email_user", args=(user,), kwargs={}, routing_key="tasks.email")
```
2014-07-02 09:49:56 +02:00
David Barragán Merino 234ee7a2bc Remove the coding lines 2014-04-25 12:33:16 +02:00
David Barragán Merino 2c973f50cd Change license to AGPL-3.0 (minor fixes) 2014-04-23 13:03:47 +02:00
Andrey Antukh 1af8ba7f21 Move settings to project repo root path. 2014-02-28 12:10:25 +01:00