File tree Expand file tree Collapse file tree 3 files changed +5
-12
lines changed
src/simcore_service_clusters_keeper/core Expand file tree Collapse file tree 3 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ CLUSTERS_KEEPER_EC2_INSTANCES_PREFIX=""
5959CLUSTERS_KEEPER_LOGLEVEL=INFO
6060CLUSTERS_KEEPER_MAX_MISSED_HEARTBEATS_BEFORE_CLUSTER_TERMINATION=5
6161CLUSTERS_KEEPER_PRIMARY_EC2_INSTANCES=null
62- CLUSTERS_KEEPER_TASK_INTERVAL=30
62+ CLUSTERS_KEEPER_TASK_INTERVAL=00:00: 30
6363CLUSTERS_KEEPER_WORKERS_EC2_INSTANCES=null
6464CLUSTERS_KEEPER_TRACING={}
6565
Original file line number Diff line number Diff line change @@ -381,9 +381,7 @@ def LOG_LEVEL(self) -> LogLevel: # noqa: N802
381381 def _valid_log_level (cls , value : str ) -> str :
382382 return cls .validate_log_level (value )
383383
384- @field_validator (
385- "CLUSTERS_KEEPER_TASK_INTERVAL" , "SERVICE_TRACKING_HEARTBEAT" , mode = "before"
386- )
384+ @field_validator ("SERVICE_TRACKING_HEARTBEAT" , mode = "before" )
387385 @classmethod
388386 def _validate_interval (
389387 cls , value : str | datetime .timedelta
Original file line number Diff line number Diff line change 1313from pytest_simcore .helpers .monkeypatch_envs import EnvVarsDict , setenvs_from_dict
1414from simcore_service_clusters_keeper .core .settings import ApplicationSettings
1515
16- _FAST_POLL_INTERVAL = 1
17-
1816
1917@pytest .fixture
2018def app_environment (
2119 app_environment : EnvVarsDict ,
2220 monkeypatch : pytest .MonkeyPatch ,
2321) -> EnvVarsDict :
2422 return app_environment | setenvs_from_dict (
25- monkeypatch , {"CLUSTERS_KEEPER_TASK_INTERVAL" : f" { _FAST_POLL_INTERVAL } " }
23+ monkeypatch , {"CLUSTERS_KEEPER_TASK_INTERVAL" : "00:00:01 " }
2624 )
2725
2826
@@ -43,10 +41,7 @@ async def test_clusters_management_task_created_and_deleted(
4341 initialized_app : FastAPI ,
4442 app_settings : ApplicationSettings ,
4543):
46- assert (
47- app_settings .CLUSTERS_KEEPER_TASK_INTERVAL .total_seconds ()
48- == _FAST_POLL_INTERVAL
49- )
44+ assert app_settings .CLUSTERS_KEEPER_TASK_INTERVAL .total_seconds () == 1
5045 assert hasattr (initialized_app .state , "clusters_cleaning_task" )
51- await asyncio .sleep (5 * _FAST_POLL_INTERVAL )
46+ await asyncio .sleep (5 )
5247 mock_background_task .assert_called ()
You can’t perform that action at this time.
0 commit comments