From 03052b83d63ba28c0f3c3988b979986cef39d353 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver <thomas@kluyver.me.uk> Date: Fri, 26 Feb 2021 16:43:25 +0000 Subject: [PATCH] More logging --- webservice/webservice.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webservice/webservice.py b/webservice/webservice.py index 37ec363f8..e67d525b6 100644 --- a/webservice/webservice.py +++ b/webservice/webservice.py @@ -389,6 +389,7 @@ async def update_job_db(config): 'calcat_feedback': msg}} response = mdc.update_dark_run_api(rid, data) if response.status_code != 200: + logging.error("Failed to update MDC for action %s, rid %s", action, rid) logging.error(Errors.MDC_RESPONSE.format(response)) except Exception as e: e = str(e) @@ -519,6 +520,8 @@ async def wait_transfers(wait_runs: List[str], in_folder: str, proposal: str): """ all_transfers = [] + logging.debug("Waiting for: propsal %s, runs %s", proposal, wait_runs) + # FIXME: this loop should be an asyncio.gather for runnr in wait_runs: rpath = "{}/r{:04d}/".format(in_folder, int(runnr)) @@ -675,6 +678,7 @@ class ActionsServer: logging.error("Unexpected error handling request", exc_info=e) resp = Errors.OTHER_ERROR.format(e).encode() + logging.debug("Sending response: %r", resp) await self.socket.send(resp) async def handle_one_req(self, req: List[bytes]) -> bytes: @@ -695,6 +699,7 @@ class ActionsServer: logging.warning(Errors.UNKNOWN_ACTION.format(action)) return Errors.UNKNOWN_ACTION.format(action).encode() + logging.info("Handling request for action %s", action) logging.debug('Running action %s, payload %r', action, payload) handler = getattr(self, 'handle_' + action.replace('-', '_')) -- GitLab