square_post.py 410 Bytes
Newer Older
1
#!/Users/misha/anaconda3/envs/testmpi/bin/python
2
import balsam.launcher.dag as dag
3 4 5 6

print("hello from square_post")
print(f"jobid: {dag.current_job.pk}")
if dag.ERROR:
7
    print("recognized error")
8 9
    dag.current_job.update_state("JOB_FINISHED", "handled error in square_post")
if dag.TIMEOUT:
10
    print("recognized timeout")
11
    dag.current_job.update_state("JOB_FINISHED", "handled timeout in square_post")