Merge lp://qastaging/~jml/libdep-service/celery-task into lp://qastaging/libdep-service

Proposed by Jonathan Lange
Status: Merged
Approved by: James Westby
Approved revision: 80
Merged at revision: 74
Proposed branch: lp://qastaging/~jml/libdep-service/celery-task
Merge into: lp://qastaging/libdep-service
Diff against target: 260 lines (+153/-18)
8 files modified
django_project/dev.cfg (+16/-0)
django_project/main.cfg (+1/-0)
djlibdep/api.py (+16/-0)
djlibdep/aptfile.py (+0/-18)
djlibdep/tasks.py (+50/-0)
djlibdep/tests/__init__.py (+1/-0)
djlibdep/tests/test_api.py (+10/-0)
djlibdep/tests/test_tasks.py (+59/-0)
To merge this branch: bzr merge lp://qastaging/~jml/libdep-service/celery-task
Reviewer Review Type Date Requested Status
James Westby (community) Approve
Review via email: mp+131968@code.qastaging.launchpad.net

Commit message

Add celery tasks for updating the database using Contents / apt-file

Description of the change

Adds kombu as an installed application, haven't added it as a dependency.

The change to insert_packages to protect against duplicate insertions means that we're going to be storing the whole thing in memory. I haven't tried catching the IntegrityError in this branch. My memory from past efforts shows that this doesn't work, as by the time you catch it the transaction has already been voided.

I just used subtask directly. I could also have used TaskSets, but don't really see what we'd win there. To my annoyance, celery duplicates something of Twisted but makes itself look simpler by merely not documenting how it actually works.

http://docs.celeryproject.org/en/2.5/userguide/tasksets.html

Tests are fairly straightforward.

Thanks,
jml

To post a comment you must log in.
Revision history for this message
James Westby (james-w) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches