Skip to content

fix: update job status for local fileglancer job executor#361

Open
allison-truhlar wants to merge 2 commits intomainfrom
fix-cli-job-status
Open

fix: update job status for local fileglancer job executor#361
allison-truhlar wants to merge 2 commits intomainfrom
fix-cli-job-status

Conversation

@allison-truhlar
Copy link
Copy Markdown
Collaborator

Clickup id: 86agx94bg

The LocalExecutor tracks running processes in-memory, but the worker subprocess architecture creates a fresh executor for each submit/poll invocation. The submit worker's process references are lost when it exits, so the poll worker's executor.poll() never detects status changes.

Fix by bypassing the worker subprocess for local executor polling:

  • Write the subprocess PID to {work_dir}/job.pid during submit
  • Add a bash EXIT trap to capture exit code in {work_dir}/exit_code
  • Poll by checking PID liveness via os.kill(pid, 0) instead of spawning a worker that creates a new (empty) executor

@krokicki

The LocalExecutor tracks running processes in-memory, but the worker
subprocess architecture creates a fresh executor for each submit/poll
invocation. The submit worker's process references are lost when it
exits, so the poll worker's executor.poll() never detects status changes.

Fix by bypassing the worker subprocess for local executor polling:
- Write the subprocess PID to {work_dir}/job.pid during submit
- Add a bash EXIT trap to capture exit code in {work_dir}/exit_code
- Poll by checking PID liveness via os.kill(pid, 0) instead of
  spawning a worker that creates a new (empty) executor
- any string would cause kwargs.get("status") to be true, and the second condition to check for "RUNNING" would never be checked.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant