Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Hi, this PR adds a couple of commands in the Immich CLI, to allow users to interact with background jobs directly from within the terminal.
It adds a new
jobs
command with these subcommands:pause
: it stops executions of a given jobresume
: resumes execution of the given jobrun
: schedules execution of a job instance, given its' namestatus
: prints the status of either all jobs, or of a specific jobWith the
run
command is it also possible to run that job only on:force
parameter in the corresponding DTO is set totrue
Also, I've edited documentation pages to describe these new features.
How Has This Been Tested?
This has been manually tested with several combinations of the
jobs run
,jobs status
,jobs pause
, andjobs resume
commands.Also, since these commands call the Jobs endpoints exposed by Immich, we can check how these affected the system also using the Immich UI.
Output
Status of all jobs
Checklist:
src/services/
uses repositories implementations for database calls, filesystem operations, etc.src/repositories/
is pretty basic/simple and does not have any immich specific logic (that belongs insrc/services/
)