Skip to content

Commit

Permalink
extra logs and timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
andreea-popescu-reef committed Jan 8, 2025
1 parent c9a5afc commit 287120b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"""

JOB_CONTAINER_PORT = 8000
WAIT_FOR_STREAMING_JOB_TIMEOUT = 10
WAIT_FOR_STREAMING_JOB_TIMEOUT = 60
WAIT_FOR_NGINX_TIMEOUT = 10


Expand Down Expand Up @@ -584,6 +584,7 @@ async def start_job(self, job_request: V0JobRequest) -> JobResult | None:
docker_image,
*docker_run_cmd,
]
logger.debug(f"~~~ ~~~ ~~~ Running job: {' '.join([str(x) for x in self.cmd])}")
self.process = await asyncio.create_subprocess_exec(
*self.cmd,
stdout=asyncio.subprocess.PIPE,
Expand Down Expand Up @@ -929,10 +930,12 @@ async def _executor_loop(self):
f"http://{ip}/health", WAIT_FOR_STREAMING_JOB_TIMEOUT
)
if job_ready:
logger.debug(f"Streaming job READY")
await miner_client.send_streaming_job_ready(
certificate=job_runner.executor_certificate
)
else:
logger.debug(f"Streaming job NOT READY")
await miner_client.send_streaming_job_failed_to_prepare()
job_runner.kill_job()

Expand Down

0 comments on commit 287120b

Please sign in to comment.