Commit 9f47484d authored by mvdbeek's avatar mvdbeek Committed by Chabrier Patrick
Browse files

Register job monitor as postfork function

parent 4a345b99
......@@ -209,7 +209,7 @@ class JobHandlerQueue(Monitors):
# If jobs are locked, there's nothing to monitor and we skip
# to the sleep.
if not
if hasattr(, 'job_manager') and not
except Exception:
log.exception("Exception in monitor_step")
......@@ -3,6 +3,7 @@ from __future__ import absolute_import
import logging
import threading
from galaxy.web.stack import register_postfork_function
from .sleeper import Sleeper
log = logging.getLogger(__name__)
......@@ -27,7 +28,11 @@ class Monitors(object):
self.sleeper = Sleeper()
self.monitor_thread = threading.Thread(name=name, target=monitor_func)
if start:
self._start = start
def start_monitoring(self):
if self._start:
def stop_monitoring(self):
Markdown is supported
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