Commit 4a3375a9 authored by Stanislav Bohm's avatar Stanislav Bohm
Browse files

Detecting if we are inside a job

parent 04a0ceeb
......@@ -5,6 +5,7 @@ import logging
import uvloop
from .job import Job
from .globals import set_job_flag
......@@ -18,6 +19,7 @@ def parse_args():
async def main():
args = parse_args()
job = Job(args.task_id, args.rank, args.ds_local_port, {})
await job.start()
_is_inside_job = False
def is_inside_job():
return _is_inside_job
def set_job_flag():
global _is_inside_job
_is_inside_job = True
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment