From be388ab68ae32506b568092a51263b7c860fba13 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Mon, 24 Jun 2019 13:34:51 +0300 Subject: [PATCH] Run idle culler as a tljh module --- tests/test_configurer.py | 4 ++-- tljh/configurer.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_configurer.py b/tests/test_configurer.py index a2ef1e2..ab5f0d2 100644 --- a/tests/test_configurer.py +++ b/tests/test_configurer.py @@ -195,7 +195,7 @@ def test_cull_service_default(): c = apply_mock_config({}) cull_cmd = [ - sys.executable, '/srv/src/tljh/cull_idle_servers.py', + sys.executable, '-m', 'tljh.cull_idle_servers', '--timeout=600', '--cull-every=60', '--concurrency=5', '--max-age=0' ] @@ -220,7 +220,7 @@ def test_set_cull_service(): } }) cull_cmd = [ - sys.executable, '/srv/src/tljh/cull_idle_servers.py', + sys.executable, '-m', 'tljh.cull_idle_servers', '--timeout=600', '--cull-every=10', '--concurrency=5', '--max-age=60', '--cull-users' ] diff --git a/tljh/configurer.py b/tljh/configurer.py index 2e549db..9da4e0a 100644 --- a/tljh/configurer.py +++ b/tljh/configurer.py @@ -208,7 +208,7 @@ def set_cull_idle_service(config): Set Idle Culler service """ cull_cmd = [ - sys.executable, '/srv/src/tljh/cull_idle_servers.py' + sys.executable, '-m', 'tljh.cull_idle_servers' ] cull_config = config['services']['cull'] print()