Job dependencies allow you to define a relationship between two jobs, ensuring that one job only runs after another job has reached a specific state.Documentation Index
Fetch the complete documentation index at: https://docs.strait.dev/llms.txt
Use this file to discover all available pages before exploring further.
Concepts
A Job Dependency consists of:- Job ID: The job that is waiting for the dependency.
- Depends On Job ID: The job that must reach a certain state first.
- Condition: The state the dependency job must reach.
Dependency Conditions
When creating a dependency, you can specify one of the following conditions:completed(Default): The dependency job must finish successfully.failed: The dependency job must fail.any: The dependency job must reach any terminal state (completed, failed, canceled, etc.).
Use Cases
- Sequential Processing: Ensure Job B (e.g., “Generate Invoice”) only runs after Job A (e.g., “Process Payment”) completes successfully.
- Error Handling: Trigger Job C (e.g., “Notify Support”) only if Job A fails.
- Cleanup: Run Job D (e.g., “Delete Temporary Files”) regardless of whether Job A succeeded or failed.
Managing Dependencies
Job dependencies are enabled by default.
Create a Dependency
To make Job B depend on Job A completing successfully:List Dependencies
To see all jobs that a specific job depends on:Delete a Dependency
Behavior
When a job with dependencies is triggered:- Strait checks if all dependencies are met.
- If dependencies are not met, the job run may enter a
waitingstate or be delayed until the conditions are satisfied. - Once all dependency conditions are met, the job is moved to the
queuedstate for execution.