Icinga / icingaweb2-module-reporting

Icinga Reporting is the central component for reporting related functionality in the monitoring web frontend and framework Icinga Web 2.
GNU General Public License v2.0
65 stars 24 forks source link

Don't override scheduled schedules with the new ones #221

Closed yhabteab closed 1 year ago

yhabteab commented 1 year ago

Fixes a daemon crash when reloading the schedules after 5m.

Removing Schedule1 as it either no longer exists in the database or its config has been changed
PHP Fatal error:  Uncaught InvalidArgumentException: Task Schedule1 not scheduled in /usr/local/src/ipl-scheduler/src/Scheduler.php:159
Stack trace:
#0 /usr/share/icingaweb2-modules/reporting/application/clicommands/ScheduleCommand.php(63): ipl\Scheduler\Scheduler->remove(Object(Icinga\Module\Reporting\Schedule))
#1 /usr/share/icinga-php/vendor/vendor/react/event-loop/src/ExtEvLoop.php(144): Icinga\Module\Reporting\Clicommands\ScheduleCommand->Icinga\Module\Reporting\Clicommands\{closure}(Object(React\EventLoop\Timer\Timer))
#2 [internal function]: React\EventLoop\ExtEvLoop->React\EventLoop\{closure}()
#3 /usr/share/icinga-php/vendor/vendor/react/event-loop/src/ExtEvLoop.php(208): EvLoop->run(2)
#4 /usr/share/icinga-php/vendor/vendor/react/event-loop/src/Loop.php(55): React\EventLoop\ExtEvLoop->run()
#5 [internal function]: React\EventLoop\Loop::React\EventLoop\{closure}()
#6 {main}
  thrown in /usr/local/src/ipl-scheduler/src/Scheduler.php on line 159