Review 11.5 Merged

78220[BUGFIX] Output errors to CLI in scheduler:run command

Benjamin Franzke CR +2 V +2 Easy +18 −27 updated 04/21/23, 06:43

Commit message

Whenever a scheduler task fails during execution
via CLI `scheduler:run`, the error message is
now always written to stderr.

This gives the task executor (e.g. cron) a chance
to identify any failures, if even stdout is
redirected to /dev/null.

The task-loop is adapted to avoid (ab)using
exceptions for control-flow (for loop-abortion).
It instead now uses nullables to signal that
not finding a next-task is expected behavior,
not an exception.

Also the exit code of the command is adapted
to switch to 1 in case at least one error
occured. (This is important in case the cronjob
is executed as systemd-timer)

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
  • Verified V +2 Done
    • Benjamin Franzke +2
    • core-ci +1 CI

Issues 1

Files 2

Review log 56

  1. Benjamin Franzke uploaded patch set 1 03/22/23, 22:52

  2. core-ci voted on patch set 1 V +1 03/22/23, 23:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39425

  3. Mathias Brodala commented on patch set 1 03/23/23, 08:59

  4. Benjamin Franzke voted on patch set 1 V +1 CR +1 04/21/23, 05:53

  5. Benjamin Franzke voted on patch set 1 V +2 CR +2 04/21/23, 06:42

  6. Benjamin Franzke merged patch set 2 04/21/23, 06:43