Skip to content

Commit 9337c75

Browse files
committed
Merge branch 'develop' into add-no-containers-option
2 parents ba6ab0f + 9e808ce commit 9337c75

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

core/schains/monitor/action.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,7 @@ def firewall_rules(self) -> bool:
297297
def skaled_container(
298298
self,
299299
download_snapshot: bool = False,
300-
start_ts: Optional[int] = None,
301-
restart_on_exit: bool = True
300+
start_ts: Optional[int] = None
302301
) -> bool:
303302
logger.info(
304303
'Starting skaled container watchman snapshot: %s, start_ts: %s',
@@ -311,7 +310,6 @@ def skaled_container(
311310
skaled_status=self.skaled_status,
312311
download_snapshot=download_snapshot,
313312
start_ts=start_ts,
314-
restart_on_exit=restart_on_exit,
315313
dutils=self.dutils
316314
)
317315
time.sleep(CONTAINER_POST_RUN_DELAY)

core/schains/monitor/containers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def monitor_schain_container(
5252
skaled_status,
5353
download_snapshot=False,
5454
start_ts=None,
55-
restart_on_exit=True,
5655
dutils=None
5756
) -> None:
5857
dutils = dutils or DockerUtils()
@@ -63,7 +62,7 @@ def monitor_schain_container(
6362
logger.error(f'Data volume for sChain {schain_name} does not exist')
6463
return
6564

66-
if not restart_on_exit and skaled_status.exit_time_reached:
65+
if skaled_status.exit_time_reached:
6766
logger.info(
6867
f'{schain_name} - Skipping container monitor: exit time reached')
6968
skaled_status.log()

core/schains/monitor/skaled_monitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def execute(self):
161161
if not self.checks.volume:
162162
self.am.volume()
163163
if not self.checks.skaled_container:
164-
self.am.skaled_container(restart_on_exit=False)
164+
self.am.skaled_container()
165165
else:
166166
self.am.reset_restart_counter()
167167
if not self.checks.rpc:

tests/schains/monitor/action/skaled_action_test.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def monitor_schain_container_mock(
3939
skaled_status,
4040
download_snapshot=False,
4141
start_ts=None,
42-
restart_on_exit=True,
4342
dutils=None
4443
):
4544
image_name, container_name, _, _ = get_container_info(
@@ -133,7 +132,6 @@ def test_skaled_container_with_snapshot_action(skaled_am):
133132
skaled_status=skaled_am.skaled_status,
134133
download_snapshot=True,
135134
start_ts=None,
136-
restart_on_exit=True,
137135
dutils=skaled_am.dutils
138136
)
139137
assert monitor_schain_mock.call_count == 1
@@ -157,7 +155,6 @@ def test_skaled_container_snapshot_delay_start_action(skaled_am):
157155
skaled_status=skaled_am.skaled_status,
158156
download_snapshot=True,
159157
start_ts=ts,
160-
restart_on_exit=True,
161158
dutils=skaled_am.dutils
162159
)
163160
assert monitor_schain_mock.call_count == 1

0 commit comments

Comments
 (0)