Skip to content

Commit 3570bd5

Browse files
added logs on subflow
1 parent ea0dd8f commit 3570bd5

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • shuffle-subflow/1.1.0/src

shuffle-subflow/1.1.0/src/app.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ def run_subflow(self, user_apikey, workflow, argument, source_workflow="", sourc
208208
"Authorization": "Bearer %s" % user_apikey,
209209
"User-Agent": "Shuffle Subflow 1.1.0"
210210
}
211+
self.logger.info("[INFO] Sending a request to %s" % url)
211212

212213
if len(auth_override) > 0:
213214
headers["appauth"] = auth_override
@@ -224,7 +225,7 @@ def run_subflow(self, user_apikey, workflow, argument, source_workflow="", sourc
224225
#print(f"ARG: {argument}")
225226
try:
226227
ret = requests.post(url, headers=headers, params=params, json=argument, verify=False, proxies=self.proxy_config)
227-
print(f"Successfully sent argument of length {len(str(argument))} as JSON")
228+
self.logger.info(f"Successfully sent argument of length {len(str(argument))} as JSON")
228229
except:
229230
try:
230231
ret = requests.post(url, headers=headers, json=argument, params=params, verify=False, proxies=self.proxy_config)
@@ -233,8 +234,8 @@ def run_subflow(self, user_apikey, workflow, argument, source_workflow="", sourc
233234
ret = requests.post(url, headers=headers, data=argument, params=params, verify=False, proxies=self.proxy_config)
234235
print("Successfully sent as data (3)")
235236

236-
print("Status: %d" % ret.status_code)
237-
print("RET: %s" % ret.text)
237+
self.logger.info("Status: %d" % ret.status_code)
238+
self.logger.info("RET: %s" % ret.text)
238239

239240
return ret.text
240241

0 commit comments

Comments
 (0)