require register-env to wait until batch is hit

This commit is contained in:
dmahan93 2025-05-08 11:28:38 -05:00 committed by GitHub
parent 3863ece98b
commit 301cc03b9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -100,6 +100,15 @@ async def register(registration: Registration):
@app.post("/register-env")
async def register_env_url(register_env: RegisterEnv):
try:
if not app.state.started:
return {
"status": "wait for trainer to start",
}
except AttributeError:
return {
"status": "wait for trainer to start",
}
try:
isinstance(app.state.envs, list)
except AttributeError: