Skip to content

Commit

Permalink
refactor: use pickle.HIGHEST_PROTOCOL when pickling messages in `DA…
Browse files Browse the repository at this point in the history
…QJobRemote`
  • Loading branch information
furkan-bilgin committed Oct 22, 2024
1 parent 68692cd commit 60ac04b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/daq/jobs/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def _pack_message(self, message: DAQJobMessage, use_pickle: bool = True) -> byte
message_type = type(message).__name__
self._logger.debug(f"Packing message {message_type} ({message.id})")
if use_pickle:
return pickle.dumps(message)
return pickle.dumps(message, protocol=pickle.HIGHEST_PROTOCOL)

return json.dumps([message_type, message.to_json()]).encode("utf-8")

Expand Down

0 comments on commit 60ac04b

Please sign in to comment.