bullet-train-pro / bullet_train-action_models

Other
4 stars 1 forks source link

Feature request: delayed cleanup #55

Open petekeen-cf opened 1 year ago

petekeen-cf commented 1 year ago

ActionModels::CleansUp deletes the action immediately after it's completed, which is nice for some things but for a lot of use cases I think a better design would be to delay cleanup by some number of minutes/hours/days. In particular, we can't use CleansUp with PerformsExport because if we do there's no way for the user to download the exported data. We do generally want these to be cleaned up, though, because old exports take up a lot of space in the db and/or attachment storage.

Possible design:

Queuing the sidekiq worker is the responsibility of the user because we can't assume they're using Sidekiq pro.