-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_generate_plot.py
More file actions
36 lines (30 loc) · 778 Bytes
/
run_generate_plot.py
File metadata and controls
36 lines (30 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import asyncio
import traceback
def run():
try:
import app_fixed
except Exception as e:
print('Failed to import app_fixed:', e)
traceback.print_exc()
return 1
async def main():
try:
res = await app_fixed.generate_plot()
print('generate_plot completed:', res)
except Exception:
traceback.print_exc()
asyncio.run(main())
return 0
if __name__ == '__main__':
raise SystemExit(run())
import asyncio
import app_fixed
async def main():
try:
res = await app_fixed.generate_plot()
print('generate_plot completed:', res)
except Exception as e:
import traceback
traceback.print_exc()
if __name__ == '__main__':
asyncio.run(main())