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

Fix celerybeat run dir #357

Merged
merged 3 commits into from
Jun 25, 2019
Merged

Conversation

vikalpj
Copy link
Contributor

@vikalpj vikalpj commented Jun 10, 2019

Why was this change necessary?

When the server gets restarted, /var/run/celery doesn;t exist and server is on 100% CPU usage.

How does it address the problem?

systemd services creates the directly when started and removes when its stopped.

Are there any side effects?

Not known as of now

@theskumar
Copy link
Member

Hi Vikalp, thanks for the PR.

Do we have doc on how the celery dir will always be created at /var/run/ , I looked around and it seems the file get at /run/.

Cheers.

@theskumar
Copy link
Member

That said, I always feel that https://github.com/mixkorshun/celery-beatx would be a better alternative to filesystem based scheduler.

@vikalpj
Copy link
Contributor Author

vikalpj commented Jun 10, 2019

@theskumar /var/run and /run are one and the same thing. /var/run by default is a symbolic link for /run.

Let me have a look at celery-beatx and revert back.

@vikalpj
Copy link
Contributor Author

vikalpj commented Jun 10, 2019

IMO I would either prefer using same scheduler for small projects. for large scale project I would believe we can use one from

@theskumar thoughts?

@theskumar
Copy link
Member

Thanks for the info.

I don't quite get what the advantage of django-celery over normal setup, so I can't recommend.

https://github.com/sibson/redbeat
https://github.com/mixkorshun/celery-beatx

These two are most or less solve the same problem. I find beatx to be lean and simple compared to redbeat and that's why the recommendation for swapping out with filesystem beatfile with redis. This is one of things that is easier to miss while running in multi-server setup, while I think it doesn't add a lot of complication if it is available in boilerplate, even on a single server, as redis would available as celery broker.

I'll merge this now and we see if using redis would make sense in the boilerplate.

@theskumar
Copy link
Member

Added #361

@vikalpj vikalpj deleted the fix_celerybeat_run_dir branch June 25, 2019 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants