Skip to content

Conversation

@smartekIT
Copy link
Contributor

It's faster and easier to rely on mongodb TTL feature to clean the old finished jobs after 30 days.
This update is changing the format how we save the completeTime value in the database of ScriptTask.
Also it adds a new index to the database to activate the TTL feature to clean finished jobs older than 30 days. Because of this index addition it will cause re-indexing of the ScriptTask db when update (no data lose at all, but it's a good thing to backup database before updating).

- reducing history in the database for 30 days instead of 90 days.
- added new index in the mongodb to activate TTL feature for faster process of cleaning finished jobs after 7 days.
completeTime is no longer part of latestTime to avoid invalid date records after changed to mongodb TTL and completeTime field to datetime type.
making it more satisfying by increase the mongodb TTL to 30 days before deleting the old finished jobs.
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