diff --git a/compute_endpoint/globus_compute_endpoint/engines/high_throughput/messages.py b/compute_endpoint/globus_compute_endpoint/engines/high_throughput/messages.py index 542c19f31..2c821ee75 100644 --- a/compute_endpoint/globus_compute_endpoint/engines/high_throughput/messages.py +++ b/compute_endpoint/globus_compute_endpoint/engines/high_throughput/messages.py @@ -104,10 +104,11 @@ def pack(self) -> bytes: # # all of this code is going to be eliminated soonish by # globus_compute_common.messagepack in part because of issues like this - add_ons = ( - f"TID={self.task_id};CID={self.container_id};" # type: ignore - f"{self.task_buffer}" - ) + if isinstance(self.task_buffer, bytes): + buf = self.task_buffer.decode() + else: + buf = self.task_buffer + add_ons = f"TID={self.task_id};CID={self.container_id};{buf}" self.raw_buffer = add_ons.encode("utf-8") return self.type.pack() + self.raw_buffer