Actions with no listeners that are old should be removed from queue
If an action is old (set in config) and has no more listeners it should just be evicted from the queue, since no one is waiting for the action.
see: https://github.com/TraceMachina/turbo-cache/blob/f15146d0cf94e1a9159f14db775efe4a3e27355d/cas/scheduler/simple_scheduler.rs#L432
We should implement this using timeouts and upon timing out signal to the worker to kill the action.
What exactly qualifies an action as old?
It doesn't make much sense to me to compare the timeout for an action with time elapsed since creation, so I think it has to be one of the following:
- time the worker has spent trying to complete the task (would have to be a new field I think)
- time since the action was loaded from CAS
In this case, I think it should track how long the item has been in the queue with no clients waiting on it. Then based on the config we drop or terminate the job after X number of seconds.
In this case, I think it should track how long the item has been in the queue with no clients waiting on it. Then based on the config we drop or terminate the job after X number of seconds.
Got it, thanks for the clarification!
This has been fixed a few different ways.