Skip to content

Feature | Prunable #93

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

simple-hacker
Copy link

Added the Prunable trait to the Workflow model, allowing a scheduled command to keep these tables size down. I have also added a new config value for how for how many days we should keep the Workflow models for when pruning.

I am happy to change the config property name, and the default values to something more suitable if required.

In our application, we'll be running lots of Workflows, and because the the callbacks are serialised, we found we had to change the database column from a text to a longtext to allow bigger workflows. Keeping these Venture workflow job without pruning will result in our database getting bigger and bigger. With Prunable we can help keep our database size down, as for our purposes, once it's been a week we no longer care about the workflow as these would've been processed by then.

@simple-hacker
Copy link
Author

I just had a thought, should the prunable query be ran on both the finished_at and cancelled_at columns instead of the created_at? If people have Workflows that have jobs that are delayed longer than the config is set then it would remove the workflow.

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.

1 participant