Joe
04/29/2021, 6:09 PMflavienbwk
04/29/2021, 6:12 PMJoe
04/29/2021, 6:17 PMflavienbwk
04/29/2021, 6:19 PMKevin Kho
stored_as_script=True
in your Webhook storage. Docs hereJoe
04/29/2021, 6:39 PMJoe
04/29/2021, 6:40 PMfor flow_name, flow in self._flows.items():
<http://self.logger.info|self.logger.info>("Uploading flow '{}'".format(flow_name))
data = flow_to_bytes_pickle(flow)
if self.stored_as_script:
# these checks are here in build() instead of the constructor
# so that serialization and deserialization of flows doesnot fail
if not self.flow_script_path:
msg = "flow_script_path must be provided if stored_as_script=True"
self.logger.critical(msg)
raise RuntimeError(msg)
if not os.path.isfile(self.flow_script_path):
msg = "file '{}' passed to flow_script_path does not exist".format(
self.flow_script_path
)
self.logger.critical(msg)
raise RuntimeError(msg)
with open(self.flow_script_path, "r") as f:
data = f.read().encode("utf-8")
req_function = self._method_to_function[self.build_request_http_method]
Joe
04/29/2021, 6:40 PMKevin Kho
Kevin Kho
Kevin Kho
Joe
04/29/2021, 7:23 PM