mirror of
https://github.com/clearml/clearml-agent
synced 2025-01-31 00:56:53 +00:00
Add option to set daemon polling interval (#197)
* add option to set worker polling interval * polling interval minimum value --------- Co-authored-by: Liron <liron@tapwithus.com>
This commit is contained in:
parent
293cbc0ac6
commit
98cc0d86ba
@ -640,8 +640,6 @@ class Worker(ServiceCommandSection):
|
||||
partial(PackageCollectorRequirement, collect_package=['clearml']),
|
||||
)
|
||||
|
||||
# poll queues every _polling_interval seconds
|
||||
_polling_interval = 5.0
|
||||
# machine status update intervals, seconds
|
||||
_machine_update_interval = 30.0
|
||||
|
||||
@ -1575,6 +1573,7 @@ class Worker(ServiceCommandSection):
|
||||
self._use_owner_token(kwargs.get('use_owner_token', False))
|
||||
|
||||
self._standalone_mode = kwargs.get('standalone_mode', False)
|
||||
self._polling_interval = max(kwargs.get('polling_interval', 5), 5)
|
||||
self._services_mode = kwargs.get('services_mode', False)
|
||||
# must have docker in services_mode
|
||||
if self._services_mode:
|
||||
|
@ -44,6 +44,11 @@ WORKER_ARGS = {
|
||||
}
|
||||
|
||||
DAEMON_ARGS = dict({
|
||||
'--polling-interval': {
|
||||
'help': 'Polling interval in seconds. Minimum is 5 (default 5)',
|
||||
'type': int,
|
||||
'default': 5,
|
||||
},
|
||||
'--foreground': {
|
||||
'help': 'Pipe full log to stdout/stderr, should not be used if running in background',
|
||||
'action': 'store_true',
|
||||
|
Loading…
Reference in New Issue
Block a user