Project

Profile

Help

Refactor #460

closed

Use celery.signals.worker_process_init to start the database connection

Added by rbarlow about 9 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
2.8.0
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Pulp 2
Sprint:
April 2015
Quarter:

Description

We attempted to do this in 2.4.0, but we ran into a few different issues. One of them was that for some reason our Celery tasks weren't being discovered by the workers. It was decided that this was too large of a change to go in so late in the 2.4.0 release cycle, and that we would do it the right way in a future release (perhaps 2.5.0, or 3.0.0).

Here is the pull request that first introduced the change that we would like to reintroduce in the future:

https://github.com/pulp/pulp/pull/1019

That change introduced two issues:

1) The qpid monkey patching no longer happened early enough in the worker startup, and so kombu would not work. I fixed this by moving the qpid import in initialization.py to be the first import, which revealed a second problem:

2) The Celery workers no longer discovered our tasks for some reason. I never learned why this happened before we decided to back out the change and revisit it later.

Here is the PR that removed the change:

https://github.com/pulp/pulp/pull/1023

+ This bug was cloned from Bugzilla Bug #1113192 +

Also available in: Atom PDF