9
9
import contextlib
10
10
import logging
11
11
import pathlib
12
- import math
13
12
import mimetypes
14
13
import multiprocessing .synchronize
15
14
import threading
@@ -459,7 +458,7 @@ def _heartbeat(
459
458
)
460
459
461
460
if time .time () - last_heartbeat < self ._heartbeat_interval :
462
- time .sleep (self . loop_frequency )
461
+ time .sleep (1 )
463
462
continue
464
463
465
464
last_heartbeat = time .time ()
@@ -472,7 +471,7 @@ def _heartbeat(
472
471
if self ._sv_obj :
473
472
self ._sv_obj .send_heartbeat ()
474
473
475
- time .sleep (self . loop_frequency )
474
+ time .sleep (1 )
476
475
477
476
return _heartbeat
478
477
@@ -993,21 +992,6 @@ def id(self) -> str | None:
993
992
"""Return the unique id of the run"""
994
993
return self ._id
995
994
996
- @property
997
- def loop_frequency (self ) -> int :
998
- """Returns the current frequency of monitoring.
999
-
1000
- This value is the maximum frequency of heartbeat,
1001
- emissions metric and resource metric measuring.
1002
- """
1003
- # There is no point the loop interval being greater
1004
- # than any of the metric push or heartbeat intervals
1005
- # where None use heartbeat value as default
1006
- return math .gcd (
1007
- self ._heartbeat_interval ,
1008
- self ._resources_metrics_interval or self ._heartbeat_interval ,
1009
- )
1010
-
1011
995
@skip_if_failed ("_aborted" , "_suppress_errors" , False )
1012
996
@pydantic .validate_call
1013
997
def reconnect (self , run_id : str ) -> bool :
0 commit comments