Tasker: vtk_tasker_set_timeleft
This procedure is used in the context of time-variant tasker resources. It takes a single non-negative argument, which is interpreted as the maximum expected duration for a job to be dispatched to the tasker.
namespace eval VovResources {
proc SmallJobsOnly {} {
vtk_tasker_set_timeleft 2m
return "@STD@"
}
}
- The string "UNLIMITED", meaning that the tasker accepts jobs of any length
- A positive integer
- A time specification
- The number 0, in which case the tasker is effectively suspended, because it does not accept any job
...
# -- During the day, suspend the tasker.
vtk_tasker_set_timeleft 0
...
Quantization of "timeleft" and "xdur"
Time Left | Quantized value |
---|---|
0-60s | Round up to the next multiple of 5s |
60s-30m | Round up to the next multiple of 1m |
30m-1h | Round up to the next multiple of 2m |
1h-3h | Round up to the next multiple of 5m |
3h-6h | Round up to the next multiple of 10m |
6h+ | Round up to the next multiple of 30m |