Update worker_runpod.py
Browse files- worker_runpod.py +2 -9
worker_runpod.py
CHANGED
@@ -59,16 +59,9 @@ def generate(input):
|
|
59 |
result_url = f"https://huggingface.co/{repo_id}/blob/main/{default_filename}.mp4"
|
60 |
return {"jobId": job_id, "result": result_url, "status": "DONE"}
|
61 |
except Exception as e:
|
62 |
-
|
63 |
-
try:
|
64 |
-
if(notify_uri == "notify_uri"):
|
65 |
-
#requests.post(web_notify_uri, data=json.dumps(error_payload), headers={'Content-Type': 'application/json', "Authorization": web_notify_token})
|
66 |
-
else:
|
67 |
-
#requests.post(web_notify_uri, data=json.dumps(error_payload), headers={'Content-Type': 'application/json', "Authorization": web_notify_token})
|
68 |
-
#requests.post(notify_uri, data=json.dumps(error_payload), headers={'Content-Type': 'application/json', "Authorization": notify_token})
|
69 |
-
except:
|
70 |
-
pass
|
71 |
return {"jobId": job_id, "result": f"FAILED: {str(e)}", "status": "FAILED"}
|
|
|
72 |
finally:
|
73 |
if os.path.exists(result):
|
74 |
os.remove(result)
|
|
|
59 |
result_url = f"https://huggingface.co/{repo_id}/blob/main/{default_filename}.mp4"
|
60 |
return {"jobId": job_id, "result": result_url, "status": "DONE"}
|
61 |
except Exception as e:
|
62 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
return {"jobId": job_id, "result": f"FAILED: {str(e)}", "status": "FAILED"}
|
64 |
+
|
65 |
finally:
|
66 |
if os.path.exists(result):
|
67 |
os.remove(result)
|