Skip to content

Commit

Permalink
fix: relocate log message in DAQJobRemote
Browse files Browse the repository at this point in the history
  • Loading branch information
furkan-bilgin committed Oct 22, 2024
1 parent 1a5b048 commit 68692cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/daq/jobs/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ def start(self):
time.sleep(0.1)

def _pack_message(self, message: DAQJobMessage, use_pickle: bool = True) -> bytes:
message_type = type(message).__name__
self._logger.debug(f"Packing message {message_type} ({message.id})")
if use_pickle:
return pickle.dumps(message)

message_type = type(message).__name__
self._logger.debug(f"Packing message {message_type} ({message.id})")
return json.dumps([message_type, message.to_json()]).encode("utf-8")

def _unpack_message(self, message: bytes) -> DAQJobMessage:
Expand Down

0 comments on commit 68692cd

Please sign in to comment.