Make the background job time-sensitive so cron actually runs it
Build package / php-lint (8.2) (push) Successful in 48s
Build package / php-lint (8.3) (push) Successful in 45s
Build package / php-lint (8.4) (push) Successful in 47s
Build package / xml-lint (push) Successful in 13s
Build package / unit-tests (push) Successful in 43s
Build package / package (push) Canceled after 0s
Build package / php-lint (8.2) (push) Successful in 48s
Build package / php-lint (8.3) (push) Successful in 45s
Build package / php-lint (8.4) (push) Successful in 47s
Build package / xml-lint (push) Successful in 13s
Build package / unit-tests (push) Successful in 43s
Build package / package (push) Canceled after 0s
The job was registered but never executed: `background-job:list` kept showing last_run = 1970-01-01. It was marked TIME_INSENSITIVE, and OC\Core\Service\CronService::runCli() reads `maintenance_window_start` and calls jobList->getNext($onlyTimeSensitive = true) whenever the current UTC hour is outside [start, start+4] -- so with a maintenance window configured, time-insensitive jobs are skipped for the other 20 hours of the day. A job whose entire purpose is a 5-minute (now configurable down to 60s) reaction time is time-sensitive by definition. Also fix the occ invocation in README.md and CLAUDE.md: background-job:worker takes job classes, not an app id, so the documented `background-job:worker workflow_deck_automation` matched nothing.
This commit is contained in:
@@ -74,7 +74,14 @@ composer run test:unit # PHPUnit — reine Filter-Logik, benötigt keine Deck-I
|
||||
Ein echter End-to-End-Test (Karte anlegen, Workflow konfigurieren, Hintergrundjob auslösen, Verschiebung + Mail prüfen) lässt sich nur gegen eine echte Nextcloud-34-Instanz mit installierter Deck-App durchführen, z. B. per:
|
||||
|
||||
```bash
|
||||
php occ background-job:worker workflow_deck_automation
|
||||
# Job-ID und letzten Lauf anzeigen
|
||||
php occ background-job:list --class 'OCA\WorkflowDeckAutomation\BackgroundJob\RunWorkflowsJob'
|
||||
|
||||
# Sofort ausführen, unabhängig vom Intervall
|
||||
php occ background-job:execute <id> --force-execute
|
||||
|
||||
# Oder dauerhaft als Worker laufen lassen (Argument ist die Job-Klasse, keine App-ID)
|
||||
php occ background-job:worker 'OCA\WorkflowDeckAutomation\BackgroundJob\RunWorkflowsJob'
|
||||
```
|
||||
|
||||
### Release-Paket bauen
|
||||
|
||||
Reference in New Issue
Block a user