Commit b924b8f9 authored by Chris's avatar Chris
Browse files

Allow one-off tasks with haproxy sockets to start and finish.

parent d95216a0
Pipeline #8421 failed with stages
in 3 minutes and 56 seconds
...@@ -285,7 +285,7 @@ class Stapledaemon(object): ...@@ -285,7 +285,7 @@ class Stapledaemon(object):
] ]
# Check if enabled before adding stapleadder queue. # Check if enabled before adding stapleadder queue.
if self.staple_adder: if self.staple_adder:
stop_threads.append(('adder', [self.staple_adder])) stop_threads.append(('proxy-add', [self.staple_adder]))
def one_off_generator(): def one_off_generator():
"""Make generator to iteratively end the stapled process.""" """Make generator to iteratively end the stapled process."""
...@@ -297,7 +297,8 @@ class Stapledaemon(object): ...@@ -297,7 +297,8 @@ class Stapledaemon(object):
for queue, threads in stop_threads: for queue, threads in stop_threads:
# Queue must exist, if it doesn't it wasn't yet created. # Queue must exist, if it doesn't it wasn't yet created.
if not self.scheduler.queue_exists(queue): # Wait for it to be created.
while not self.scheduler.queue_exists(queue):
yield False yield False
# Wait until queues are empty.. # Wait until queues are empty..
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment