From 76c9339453b00e6772e6890edfcf3d4482c1bc51 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 29 Jun 2017 09:37:32 +0300 Subject: [PATCH] Rename GC worker package to `gc` --- conf/init/service/gcworker/run | 2 +- workers/{gcworker => gc}/__init__.py | 0 workers/{gcworker => gc}/gcworker.py | 2 +- workers/{gcworker => gc}/models_interface.py | 0 workers/{gcworker => gc}/models_pre_oci.py | 2 +- workers/{gcworker => gc}/test/test_gcworker.py | 2 +- 6 files changed, 4 insertions(+), 4 deletions(-) rename workers/{gcworker => gc}/__init__.py (100%) rename workers/{gcworker => gc}/gcworker.py (89%) rename workers/{gcworker => gc}/models_interface.py (100%) rename workers/{gcworker => gc}/models_pre_oci.py (91%) rename workers/{gcworker => gc}/test/test_gcworker.py (68%) diff --git a/conf/init/service/gcworker/run b/conf/init/service/gcworker/run index 50b974b6a..d31f814a4 100755 --- a/conf/init/service/gcworker/run +++ b/conf/init/service/gcworker/run @@ -3,6 +3,6 @@ echo 'Starting GC worker' cd / -venv/bin/python -m workers.gcworker.gcworker 2>&1 +venv/bin/python -m workers.gc.gcworker 2>&1 echo 'Repository GC exited' \ No newline at end of file diff --git a/workers/gcworker/__init__.py b/workers/gc/__init__.py similarity index 100% rename from workers/gcworker/__init__.py rename to workers/gc/__init__.py diff --git a/workers/gcworker/gcworker.py b/workers/gc/gcworker.py similarity index 89% rename from workers/gcworker/gcworker.py rename to workers/gc/gcworker.py index d53a4ac3b..5cf434eba 100644 --- a/workers/gcworker/gcworker.py +++ b/workers/gc/gcworker.py @@ -1,6 +1,6 @@ from app import app from data.database import UseThenDisconnect -from workers.gcworker.models_pre_oci import pre_oci_model as model +from workers.gc.models_pre_oci import pre_oci_model as model from workers.worker import Worker class GarbageCollectionWorker(Worker): diff --git a/workers/gcworker/models_interface.py b/workers/gc/models_interface.py similarity index 100% rename from workers/gcworker/models_interface.py rename to workers/gc/models_interface.py diff --git a/workers/gcworker/models_pre_oci.py b/workers/gc/models_pre_oci.py similarity index 91% rename from workers/gcworker/models_pre_oci.py rename to workers/gc/models_pre_oci.py index ec6e3ea99..bb1fda906 100644 --- a/workers/gcworker/models_pre_oci.py +++ b/workers/gc/models_pre_oci.py @@ -3,7 +3,7 @@ import logging from data.model.repository import (find_repository_with_garbage, garbage_collect_repo, get_random_gc_policy) -from workers.gcworker.models_interface import GCWorkerDataInterface +from workers.gc.models_interface import GCWorkerDataInterface logger = logging.getLogger(__name__) diff --git a/workers/gcworker/test/test_gcworker.py b/workers/gc/test/test_gcworker.py similarity index 68% rename from workers/gcworker/test/test_gcworker.py rename to workers/gc/test/test_gcworker.py index 45f77ea82..c301fc4b9 100644 --- a/workers/gcworker/test/test_gcworker.py +++ b/workers/gc/test/test_gcworker.py @@ -1,4 +1,4 @@ -from workers.gcworker.gcworker import GarbageCollectionWorker +from workers.gc.gcworker import GarbageCollectionWorker from test.fixtures import *