-
Notifications
You must be signed in to change notification settings - Fork 489
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
Garbage collecting tasks #285
Comments
Those stats are not available but can be added: Would adding a created and last enabled date be enough, to implement the clean up code on your end? |
It would. Assuming we can get a last recorded/replayed date for backtest tasks and last enabled date for production tasks we probably don't actually need/care for a created date. A last modified date instead would be more useful (a creation would count as a modification in this case). The goal here is to clean up tasks that haven't been used or modified recently. Thanks! |
@lpalm I am starting work on this. Just to make sure what I have planned will work.... I plan to add to dates to all tasks.
What this means is that to find unused tasks you would search for tasks that are:
Depending on your needs. Note the a task make have really old enabled and modified dates but still be Also work is nearly done to add a golang HTTP client for the API so that should help with the automation aspect. |
@nathanielc that sounds good. If the created date is easy to keep, it would be handy for auditing/stats collection down the road. That's not a blocker and not as important as the enabled/modified dates, though. |
I think it will be a good addition to add LastCollectedTime and LastEmittedTime for nodes, so you can find tasks that aren't in use or don't trigger alerts. |
@yosiat we currently log both the batched/aggregated datapoints used as inputs to the alerts and the alert firing instances themselves into InfluxDB. This has some overlap with your use case (tracking emissions) and I believe will be natively supported soon (#286. we currently do it with a simple HTTP/JSON translator). |
@lpalm I am talking about a streaming mode where we ingest directly to Kapacitor and where we don't want to save historical statistics to influxdb. |
fixes #285, track dates for easy deletion of unused tasks
I have test tasks that users iterate on by backtesting them until they reach a desired configuration and threshold. Once that happens, the task is upgraded to a production task which can be managed manually.
Not all backtested tasks will graduate to production, and some may be abandoned for a while and be worked on again. These build up so we'd like to be able to periodically and automatically clean up any tasks that haven't been run in the last X weeks. Currently I don't see a way to get the last modified time or last active time of a task. Is this available somewhere? These tasks backtest tasks would only ever be used to record and replay past data.
I could potentially add a "created" timestamp to the name of the task, but this feels a bit kludgy and might cause problems for tasks that are being actively worked on.
The text was updated successfully, but these errors were encountered: