feat: start background jobs by name with JSON input
IU
37m ago+146+146+012345678901234567890123456789-50-50-01234567890123456789
What has changed and why?
JobRunner.submitnow takes a job name and JSON input, not a Python function.- The runner checks the input at submit. An unknown job name or input that is not JSON fails at once, and no job is created.
- The job gets a copy of the input, as it would in another process.
How has it been tested?
- Changed the runner, route and client tests to start jobs by name.
- Added tests for an unknown job name, input that is not JSON, and a change to the input after submit.
Did you update CHANGELOG.md?
- Yes
- Not needed (internal change)
Summary by CodeRabbit
- New Features
- Jobs can now be submitted by registered name with a JSON-compatible input payload, which is provided to the job when it runs.
- Bug Fixes
- Submissions with unknown job names or inputs that cannot be represented as JSON are rejected before the job runs.
- Submitted inputs are copied before execution, preventing later changes to the original payload from affecting the job.