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

Validation of RecurringTask #428

Closed
cedricpim opened this issue Nov 27, 2024 · 1 comment
Closed

Validation of RecurringTask #428

cedricpim opened this issue Nov 27, 2024 · 1 comment

Comments

@cedricpim
Copy link

cedricpim commented Nov 27, 2024

I searched but I couldn't find any similar request. I was wondering if it would make sense to add an option to raise an error if any recurring task is invalid?

From what I see, invalid recurring tasks are silently ignored here:

def recurring_tasks
@recurring_tasks ||= recurring_tasks_config.map do |id, options|
RecurringTask.from_configuration(id, **options)
end.select(&:valid?)
end
But it is easy to add a task with a typo and it would go into production and be discarded silently (someone can always check that the records were created but that's a bit time consuming).

I would be up to prepare a PR but wanted to check that this is something SolidQueue team wants.

PS: While writing this, I also thought if having a rake task could be interesting, to make it part of the deployment process for example.

@rosa
Copy link
Member

rosa commented Nov 27, 2024

Hey @cedricpim, there's already an issue for this: #414 and a PR was submitted yesterday: #427. I just haven't had time to review yet. I'm closing this one in favour of #414.

@rosa rosa closed this as completed Nov 27, 2024
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

2 participants