From 56ceef823ab11ffce3c420ab1807f4800098bb6b Mon Sep 17 00:00:00 2001 From: Tom McKay Date: Tue, 5 Feb 2019 15:52:43 -0500 Subject: [PATCH] 1316 - exportactionlogsworker period to 60sec --- workers/exportactionlogsworker.py | 2 +- workers/test/test_exportactionlogsworker.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/workers/exportactionlogsworker.py b/workers/exportactionlogsworker.py index 2c4b5b66c..f7aa8a0d2 100644 --- a/workers/exportactionlogsworker.py +++ b/workers/exportactionlogsworker.py @@ -22,7 +22,7 @@ from util.useremails import send_logs_exported_email logger = logging.getLogger(__name__) -POLL_PERIOD_SECONDS = 1 +POLL_PERIOD_SECONDS = app.config.get('EXPORT_ACTION_LOGS_WORKER_POLL_PERIOD', 60) EXPORT_LOGS_STORAGE_PATH = app.config.get('EXPORT_ACTION_LOGS_STORAGE_PATH', 'exportedactionlogs') MAXIMUM_WORK_PERIOD_SECONDS = app.config.get('EXPORT_ACTION_LOGS_MAXIMUM_SECONDS', 60 * 60) # 1 hour diff --git a/workers/test/test_exportactionlogsworker.py b/workers/test/test_exportactionlogsworker.py index 44f919113..208eea0ab 100644 --- a/workers/test/test_exportactionlogsworker.py +++ b/workers/test/test_exportactionlogsworker.py @@ -7,7 +7,7 @@ from httmock import urlmatch, HTTMock from data import model from data.logs_model import logs_model -from workers.exportactionlogsworker import ExportActionLogsWorker +from workers.exportactionlogsworker import ExportActionLogsWorker, POLL_PERIOD_SECONDS from test.fixtures import * @@ -64,3 +64,5 @@ def test_process_queue_item(namespace, repo_name, expects_logs, app): assert created_json['export_id'] == 'someid' assert len(created_json['logs']) == (expected_count + 1) + + assert POLL_PERIOD_SECONDS == 60