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

Should delete the old recurring task when the task changed key, or removed #382

Open
iuhoay opened this issue Oct 13, 2024 · 8 comments
Open

Comments

@iuhoay
Copy link

iuhoay commented Oct 13, 2024

When the key of a recurring task is changed or the task is removed, should the old task be automatically deleted? This is to ensure that outdated tasks do not continue to run.

@brettallred
Copy link

I was wondering the same thing.

We had a recurring task defined in recurring.yml. After deploy it began running on the regular schedule.
I added three more recurring tasks and removed the original task. However, in the recurring tasks, it is still being executed.

I'm about to look into the internals now, but I'm assuming that the yml file is being read and creating records in the DB. We probably need to remove the DB entry manually for now but wondering if this is a known issue.

@rosa
Copy link
Member

rosa commented Oct 14, 2024

Hey! Are you sure the removed task is still running or just listed in Mission Control but not running? See

@iuhoay
Copy link
Author

iuhoay commented Oct 14, 2024

Got it, thanks a lot! @rosa

@antulik
Copy link

antulik commented Nov 14, 2024

@rosa I can confirm the removed task is indeed running.

@rosa
Copy link
Member

rosa commented Nov 14, 2024

@antulik how can you confirm this? Do you have examples of solid_queue_recurring_executions records created after you've deleted the task from the config and redeployed, restarting the processes?

@antulik
Copy link

antulik commented Nov 14, 2024

My apologies, I didn't look deep enough. Execution is not scheduled. To be more specific for a removed cron task:

  • Mission Control -> Recurring tasks -> Next: column IS updated
  • Mission Control -> Recurring tasks -> Last enqueued: column is NOT updated
  • Job execution is NOT scheduled

Updated Next column threw me off as I expected it to not change as well. TIL

@rosa
Copy link
Member

rosa commented Nov 14, 2024

Ahhh, makes sense. I'm going to fix this confusion in any case very soon, making sure recurring tasks that are removed from the config are also removed from the DB.

@rosa
Copy link
Member

rosa commented Nov 14, 2024

Actually going to reopen this one to track that.

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

No branches or pull requests

4 participants