diff --git a/nlds_processors/transfer/base_transfer.py b/nlds_processors/transfer/base_transfer.py index 9a1d1d1..6849b63 100644 --- a/nlds_processors/transfer/base_transfer.py +++ b/nlds_processors/transfer/base_transfer.py @@ -101,7 +101,11 @@ def _callback_common(self, cm, method, properties, body, connection): # Set uid and gid from message contents self.log("Setting uid and gids now.", RK.LOG_INFO) - self.set_ids(self.body_json) + try: + self.set_ids(self.body_json) + except KeyError as e: + self.log("Problem running set_ids, exiting callback", RK.LOG_ERROR) + return # Append route info to message to track the route of the message self.body_json = self.append_route_info(self.body_json) diff --git a/nlds_processors/transfer/get_transfer.py b/nlds_processors/transfer/get_transfer.py index db69fea..a0af21a 100644 --- a/nlds_processors/transfer/get_transfer.py +++ b/nlds_processors/transfer/get_transfer.py @@ -210,10 +210,12 @@ def _transfer_files( # build the routing keys rk_complete = ".".join([rk_origin, RK.TRANSFER_GET, RK.COMPLETE]) rk_failed = ".".join([rk_origin, RK.TRANSFER_GET, RK.FAILED]) - # set the ids for the + # set the ids for the files if self.chown_fl: - self.set_ids(body_json) - + try: + self.set_ids(body_json) + except KeyError as e: + self.log("Problem running set_ids in _transfer_files", RK.LOG_ERROR) # Create client self.client = minio.Minio( tenancy,