Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restart celery after any changes to the code #177

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

StuartMacKay
Copy link
Contributor

Ensure that any celery workers are restarted so that they pick up and changes to the code after a deploy.

This pull request is dependent on the changes in YPCrumble/django-default-project#2 which add celery to the django default project so the molecule tests pass.

@YPCrumble
Copy link
Collaborator

@StuartMacKay about to merge this in, thank you!!! It looks like there's one place missing, which is to restart Celery when the celery configuration file changes, or these two sections:

- name: Create the script file for {{ celery_application_name }}
  ansible.builtin.template: src={{ celery_template_file }}
            dest={{ celery_scripts_dir }}/{{ celery_application_name }}_start
            owner={{ celery_user }}
            group={{ celery_group }}
            mode=0755

- name: Create the script file for {{ celery_beat_application_name }}
  ansible.builtin.template: src={{ celery_beat_template_file }}
            dest={{ celery_scripts_dir }}/{{ celery_beat_application_name }}_start
            owner={{ celery_user }}
            group={{ celery_group }}
            mode=0755

Happy for you to make those additions or if not I'll make a separate PR soon and close this one. Thank you again, hoping you're still using this repo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants