Commit Graph

927 Commits (0e414267db2437ae4c75ff607536657aaa913cb5)

Author SHA1 Message Date
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 625c705807 Update urls.py 2014-07-02 08:14:51 +02:00
David Barragán Merino 4a21e00b6f Update README.rst 2014-07-02 08:08:48 +02:00
Anler Hp a8085a2feb Return user photo cropped and with absolute url
Remember to run `pip install -r requirements.txt` to install the
additional dependencies.
2014-07-01 14:38:26 +02:00
Anler Hp 5ff7ec1c00 Return user's gravatar if has no photo set
If the user has no photo set use her gravatar image if available
otherwise use the default avatar image defined in
`settings.DEFAULT_AVATAR_URL`
2014-07-01 12:46:58 +02:00
Alejandro Alonso 5892841fe5 Fixing admin 2014-07-01 08:53:03 +02:00
David Barragán Merino f47e672051 Add full_name_display to the user serializer 2014-06-29 02:14:36 +02:00
David Barragán Merino b652cdc5f2 Add request to requirements 2014-06-29 02:13:03 +02:00
David Barragán Merino 10afb4b5b4 Merge pull request #53 from taigaio/bugfixes
Bugfixes
2014-06-27 14:22:35 +02:00
Anler Hp cfc35d5ed2 Required estimated-start/end dates for milestones 2014-06-27 14:07:50 +02:00
Anler Hp 95a708dd59 Project api should return all roles 2014-06-27 12:22:41 +02:00
Alejandro Alonso 19a8dc14c8 Fixing milestone serializer, adding duplicated name validation 2014-06-26 16:58:48 +02:00
Anler Hp e2b8687980 Bugfix: Reload version attr in OCC 2014-06-26 09:59:44 +02:00
Alejandro Alonso 077de2bf4e Updating occ tests 2014-06-25 16:19:40 +02:00
David Barragán Merino 20c6e09787 Merge pull request #52 from taigaio/tweaks
Optimizing `Project.update_role_points` method
2014-06-24 12:54:06 +02:00
Anler Hp 0a3a33aac5 Optimizing `Project.update_role_points` method 2014-06-24 12:38:29 +02:00
David Barragán Merino ba8a7a3451 Remove 60 2014-06-23 20:09:56 +02:00
Alejandro Alonso 9b97a4a9c6 Fixing bug when creating objects with OCCResourceMixin 2014-06-23 16:22:08 +02:00
Anler Hp e98d666a40 Removing unnecessary setup of test database
We are already using pg arrays so the unpickle function in sql/tags.sql
is not needed, at least by the moment. I'm removing it because it was
entering in an infinite loop when creating the test database.
2014-06-23 12:26:17 +02:00
Anler Hp a222b0d9f8 Fix ImproperlyConfigured except when creating US 2014-06-23 12:11:52 +02:00
Anler Hp 7ab671fea7 Fix invalid use of F() when creating user story 2014-06-23 12:11:02 +02:00
Anler Hp c89c6e7c31 Merge pull request #51 from taigaio/tags
Tags using pg arrays
2014-06-23 11:34:02 +02:00
Anler Hp 7ebe443394 Adding models.Model explicitly to tagged models 2014-06-23 10:58:14 +02:00
Anler Hp a8e54fb785 Support parametrized urls in the api root view
Generating the api root view was failing because urls like this

`issues/(?P<issue_id>\\d+)/voters`

cannot be reversed without the appropriate params.
2014-06-23 10:21:04 +02:00
David Barragán Merino 76bc2ac426 Add more licenses agreements to the tests.integration module 2014-06-22 11:33:44 +02:00
David Barragán Merino 83aee6a253 Update AUTHORS 2014-06-22 11:30:19 +02:00
David Barragán Merino 270b315fdf Add more licenses agreements to the tests.unit module 2014-06-20 19:48:34 +02:00
Jesús Espino dd5b64edf3 Adding is_staff to users 2014-06-20 10:29:14 +02:00
David Barragán Merino 767024d0d5 Add more licenses agreements to the tests module 2014-06-19 22:46:31 +02:00
Anler Hp 66071b5841 Removing duplicated code 2014-06-18 14:14:14 +02:00
Anler Hp 951020e528 Idiomatic code snippet 2014-06-18 14:13:59 +02:00
Anler Hp df8a7fb73c create_membership factory function 2014-06-18 14:13:20 +02:00
Anler Hp f3dd200791 Bugfix 2014-06-18 14:12:42 +02:00
Anler Hp 08b4be4e0b Re-applying migration in conflict 2014-06-18 11:15:33 +02:00
Anler Hp c33503eebf tags to pg array migrations 2014-06-18 10:14:29 +02:00
Anler Hp ac5e163dc5 Implement tags using pg arrays 2014-06-18 10:14:29 +02:00
David Barragán Merino a746a2bade Merge pull request #50 from taigaio/archived-us
Adding archived user stories feature and enabling API filtering
2014-06-18 09:54:36 +02:00
Alejandro Alonso dcc7ec0bf2 Adding archived user stories feature and enabling API filtering 2014-06-18 09:16:30 +02:00
Andrey Antukh 742266fee0 Merge pull request #49 from taigaio/concurrency-control
Optimistic Concurrency Control first approach
2014-06-17 17:30:55 +02:00
Alejandro Alonso b78a412b46 Fixing tests 2014-06-17 17:01:59 +02:00
Alejandro Alonso 57e1de23dc Avoiding race conditions in pre_save 2014-06-17 16:34:11 +02:00
Alejandro Alonso 37e61071bf Updating current version in presave instead of doing it in the post_save method 2014-06-17 16:08:59 +02:00
Alejandro Alonso e534920c01 Optimistic Concurrency Control first approach 2014-06-17 16:08:59 +02:00
David Barragán Merino d6546dc518 Refactor searches module 2014-06-17 15:10:00 +02:00
David Barragán Merino ab9043a7d7 Merge pull request #48 from taigaio/updating-doc
Updating initialization doc
2014-06-17 09:55:19 +02:00
Alejandro Alonso 4089514aac Updating initialization doc 2014-06-17 09:45:49 +02:00
David Barragán Merino 2c8524e146 Delete the rest of django test 2014-06-15 11:18:16 +02:00
David Barragán Merino c6ec50bb1e Delete obsolete test of auth module 2014-06-14 20:52:38 +02:00
David Barragán Merino 7bb4edd1fc Add more licenses agreements to the votes module 2014-06-13 18:14:27 +02:00
David Barragán Merino daee9727ce Qdd more licenses to files 2014-06-12 13:32:57 +02:00