Skip to content

Solved my dramatiq puzzle, two times!

It took me some time and a push into the right direction to solve my puzzle.

My first solution is a fix for my all actors in one worker. The fix here was to remove the dramatiq setup call from within each actor and to centralize it in the one worker file before importing the actors per context.

My second solution is a fix for my one worker per context. The fix here was to add a state to the dramatiq setup to prevent creating brokers instances after broker instances.

With my code, you are now able to create python project that uses dramatiq and has multiple actors defined in multiple worker files.

Sounds simple but took me more than an week. Hope it prevents at least one to waste that time!

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

The author does not allow comments to this entry

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Markdown format allowed
Form options