def publish_record()

in 5-appinfra/modules/hpc-monte-carlo-infra/mc_run.py [0:0]


    def publish_record(self, record):
        byte_stream = io.BytesIO()
        encoder = BinaryEncoder(byte_stream)
        self.writer.write(record, encoder)
        data = byte_stream.getvalue()
        byte_stream.flush()
        future = self.publisher_client.publish(self.topic_path, data)
        if FLAGS.print_raw:
            print(f"Published message ID: {future.result()}")