Rfaulk has submitted this change and it was merged.

Change subject: rm. refs to request notification handler from api handlers 
entry point.
......................................................................


rm. refs to request notification handler from api handlers entry point.

Change-Id: I925fd6bc7ab6ba4806b4493fd5f27232792f96e3
---
M user_metrics/api/__init__.py
M user_metrics/api/run_handlers.py
2 files changed, 3 insertions(+), 17 deletions(-)

Approvals:
  Rfaulk: Verified; Looks good to me, approved



diff --git a/user_metrics/api/__init__.py b/user_metrics/api/__init__.py
index b31d176..5d41e16 100644
--- a/user_metrics/api/__init__.py
+++ b/user_metrics/api/__init__.py
@@ -17,10 +17,6 @@
 
 query_mod = nested_import(settings.__query_module__)
 
-# Lock for request notification callback operations
-# defined in request_manager.py
-REQ_NCB_LOCK = Lock()
-
 # The url path that precedes an API request
 REQUEST_PATH = 'cohorts/'
 
diff --git a/user_metrics/api/run_handlers.py b/user_metrics/api/run_handlers.py
index 741c220..55d6c97 100644
--- a/user_metrics/api/run_handlers.py
+++ b/user_metrics/api/run_handlers.py
@@ -22,11 +22,8 @@
 __license__ = "GPL (version 2 or later)"
 
 import multiprocessing as mp
-from user_metrics.api.engine.request_manager import \
-    req_notification_queue_out, req_notification_queue_in
 from user_metrics.api.engine.response_handler import process_responses
-from user_metrics.api.engine.request_manager import job_control, \
-    requests_notification_callback
+from user_metrics.api.engine.request_manager import job_control
 from user_metrics.utils import terminate_process_with_checks
 from user_metrics.config import logging
 
@@ -35,19 +32,15 @@
 rm_callback_proc = None
 
 
-def setup_controller(msg_queue_in, msg_queue_out):
+def setup_controller(msg_queue_in):
     """
         Sets up the process that handles API jobs
     """
     job_controller_proc = mp.Process(target=job_control)
     response_controller_proc = mp.Process(target=process_responses,
                                           args=msg_queue_in)
-    rm_callback_proc = mp.Process(target=requests_notification_callback,
-                                  args=(msg_queue_in,
-                                        msg_queue_out))
     job_controller_proc.start()
     response_controller_proc.start()
-    rm_callback_proc.start()
 
 
 def teardown():
@@ -58,12 +51,9 @@
     try:
         terminate_process_with_checks(job_controller_proc)
         terminate_process_with_checks(response_controller_proc)
-        terminate_process_with_checks(rm_callback_proc)
-
     except Exception:
         logging.error(__name__ + ' :: Could not shut down callbacks.')
 
 
 if __name__ == '__main__':
-    setup_controller(req_notification_queue_in,
-        req_notification_queue_out)
+    setup_controller()

-- 
To view, visit https://gerrit.wikimedia.org/r/73722
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I925fd6bc7ab6ba4806b4493fd5f27232792f96e3
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: repair_runtime
Gerrit-Owner: Rfaulk <rfaulk...@wikimedia.org>
Gerrit-Reviewer: Rfaulk <rfaulk...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to