From eeaae764b8d2cb9e1892d5d26eecd09775adbc13 Mon Sep 17 00:00:00 2001 From: Valerio Cosentino Date: Tue, 22 Oct 2019 15:02:25 +0200 Subject: [PATCH] [common] Rename queue names This code renames the names of Arthur queues: - create --> initial_fetch_jobs - update --> incremental_fetch_jobs - archive --> archive_jobs Tests have been updated accordingly. Signed-off-by: Valerio Cosentino --- arthur/common.py | 6 +++--- tests/test_server.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arthur/common.py b/arthur/common.py index f388204..073d095 100644 --- a/arthur/common.py +++ b/arthur/common.py @@ -24,9 +24,9 @@ CH_PUBSUB = 'ch_arthur' -Q_ARCHIVE_JOBS = 'archive' -Q_CREATION_JOBS = 'create' -Q_UPDATING_JOBS = 'update' +Q_ARCHIVE_JOBS = 'archive_jobs' +Q_CREATION_JOBS = 'initial_fetch_jobs' +Q_UPDATING_JOBS = 'incremental_fetch_jobs' Q_STORAGE_ITEMS = 'items' TIMEOUT = 3600 * 24 diff --git a/tests/test_server.py b/tests/test_server.py index 2527050..b42e677 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -32,6 +32,7 @@ import rq from arthur.server import ArthurServer +from arthur.common import Q_CREATION_JOBS from base import TestBaseRQ @@ -372,7 +373,7 @@ def test_job(self, mock_utcnow): self.assertEqual(job['job_id'], job_task_result['job_id']) self.assertEqual(job['job_status'], 'finished') self.assertEqual(job['timeout'], 86400) - self.assertEqual(job['origin'], 'create') + self.assertEqual(job['origin'], Q_CREATION_JOBS) self.assertEqual(job['result'], job_task_result) self.assertEqual(job['log'], mock_logs)