-
Notifications
You must be signed in to change notification settings - Fork 11
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
get_periodic_tasks_info
ignores beat scheduler config
#18
Comments
Hi @tarasmatsyk , Were you able to resolve this? I am facing exact same issue with DatabaseScheduler. Following worked though:
https://django-celery-beat.readthedocs.io/en/stable/reference/django-celery-beat.schedulers.html |
I tried with the following code, but it still doesn't work. schedule = self.Service(
app=current_app,
max_interval=self.max_interval,
scheduler_cls=self.scheduler_cls,
schedule_filename=self.schedule,
).scheduler.get_schedule() And I noticed that Finally, I solved the issue with the following code. from celery.utils.imports import symbol_by_name
if symbol_by_name(self.scheduler_cls) == PersistentScheduler:
schedule = self.Service(
app=self.app,
max_interval=self.max_interval,
scheduler_cls=self.scheduler_cls,
schedule_filename=self.schedule,
).scheduler.get_schedule()
else:
from django_celery_beat.schedulers import DatabaseScheduler
schedule = DatabaseScheduler(self.app,lazy=True).all_as_schedule() Make sure to pass the |
Hi guys,
Thanks for the awesome package!
I was trying to configure a celery beat schedule view however could not make it work with customer scheduler like
django_celery_beat.schedulers:DatabaseScheduler
. The reason for it, from what I understand, is that configuration is ignored if noscheduler_cls
passed here:https://github.com/vintasoftware/django-celerybeat-status/blob/master/celerybeat_status/helpers.py#L9
Not sure if this is related to celerybeat-status as I might be missing something
Here are a few screenshots from debug session
The text was updated successfully, but these errors were encountered: