summaryrefslogtreecommitdiff
path: root/designate/cmd/worker.py
diff options
context:
space:
mode:
authorErik Olof Gunnar Andersson <eandersson@blizzard.com>2019-08-25 11:13:32 -0700
committerErik Olof Gunnar Andersson <eandersson@blizzard.com>2019-09-20 15:10:46 -0700
commita09064a5d15859703b97d61a1f014681a17799c6 (patch)
treeb9a0da477b65f4decd13ee6bb0b66b9de7059816 /designate/cmd/worker.py
parent23f6a79aef1303d25f8eb1c9d5090fe7f4326d46 (diff)
downloaddesignate-a09064a5d15859703b97d61a1f014681a17799c6.tar.gz
Refactored service layer
Service layer has been simplified by removing abstraction and making the implementation more in line with other OpenStack projects. Moved Heartbeat code out of Service class and into the console scripts. We only need one instance of the Heartbeat Emitter. Cleaned up the WSGI code by making use of the reusable oslo_service.wsgi code. * Added Heartbeat to designate-sink. * Cleaned up and refactored Service layers. * Fixed various bugs e.g. errors on shutdown. * Removed deprecated options host, port etc. * Simplified Heartbeat implementation. Closes-Bug: #1442141 Change-Id: I536b92407bf6ca5bddf4c048909cd13d4e094d26
Diffstat (limited to 'designate/cmd/worker.py')
-rw-r--r--designate/cmd/worker.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/designate/cmd/worker.py b/designate/cmd/worker.py
index 48a23938..0560a946 100644
--- a/designate/cmd/worker.py
+++ b/designate/cmd/worker.py
@@ -28,7 +28,6 @@ from designate.worker import service as worker_service
LOG = logging.getLogger(__name__)
CONF = designate.conf.CONF
CONF.import_opt('workers', 'designate.worker', group='service:worker')
-CONF.import_opt('threads', 'designate.worker', group='service:worker')
def main():
@@ -46,7 +45,8 @@ def main():
hookpoints.log_hook_setup()
- server = worker_service.Service(threads=CONF['service:worker'].threads)
+ server = worker_service.Service()
+ heartbeat = service.Heartbeat(server.service_name, server.tg)
service.serve(server, workers=CONF['service:worker'].workers)
- server.heartbeat_emitter.start()
+ heartbeat.start()
service.wait()