Skip to content

Conversation

dmitry-mukhin
Copy link
Contributor

ModelEntry was not checking if there is interval value in DB when updating scheduled task from settings dict.
The result was unexpected (and frustrating) behavior when one decides that he need more fine grained control over execution schedule and change only schedule from timedelta to crontab.

I propose to set schedule fields to None prior setting a proper value.

@auvipy auvipy merged commit d87fdb4 into celery:master May 10, 2017
@georgepsarakis
Copy link

@dmitry-mukhin could you please explain the call to function _next_id in https://github.com/celery/django-celery/pull/351/files#diff-fb04340bb23860bdd25c44003fd3430eR104 ? It seems undefined.

@dmitry-mukhin
Copy link
Contributor Author

@georgepsarakis, as you can see the PR was created few years ago. It's possible that _next_id was defined in that scope back then :)

_next_id = lambda: next(_next_id_get)

_next_id should be changed to next(_ids), as far as I understand

see
https://github.com/celery/django-celery/blob/master/djcelery/tests/test_schedulers.py#L105

maxmalysh pushed a commit to maxmalysh/django-celery that referenced this pull request Jul 29, 2019
… to crontab (celery#351)

* add regression test for ModelEntry.from_entry

* fix ModelEntry.from_entry and ModelEntry.__repr__ behavior
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.

3 participants