diff --git a/webservice/webservice.py b/webservice/webservice.py index 37ec363f85f2cb69a4c9290fd98fc0ad772c6676..e67d525b6a3526f5bf5925c363bc799e814a6665 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('-', '_'))