You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for adding the new option to automatically cleanup preserved jobs!
I noticed that GoodJob::Execution.finished(timestamp).delete_all inside of cleanup_preserved_jobs is querying finished_at but that column isn't indexed resulting in a table scan. I'm thinking finished_at needs an index (possibly conditional on being not null)?
The text was updated successfully, but these errors were encountered:
I'll add an index. That also caused me to notice that the cleanup task should retain Execution records until the Job itself completes successfully, then cleanup all the Job's executions at once.
bensheldon
changed the title
finished_at should be indexed
finished_at should be indexed and clean up should clean up all of a job's executions
Jan 2, 2022
Thanks for adding the new option to automatically cleanup preserved jobs!
I noticed that
GoodJob::Execution.finished(timestamp).delete_all
inside ofcleanup_preserved_jobs
is queryingfinished_at
but that column isn't indexed resulting in a table scan. I'm thinkingfinished_at
needs an index (possibly conditional on beingnot null
)?The text was updated successfully, but these errors were encountered: