Commit 29b393e
authored
fix: Prevent double scheduling events and ensure long-running events work correctly (#3561)
Fixes two issues with the `CronjobController`. We were double scheduling
events that had not run since last boot since `#execute` also schedules
the next call. Additionally we were not correctly scheduling events that
run for longer than 24 hours, since the daily timer would re-calculate
the execution date every day.1 parent a9f5d76 commit 29b393e
File tree
2 files changed
+14
-60
lines changed- packages/snaps-controllers/src/cronjob
2 files changed
+14
-60
lines changedLines changed: 4 additions & 58 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
| 278 | + | |
283 | 279 | | |
284 | | - | |
| 280 | + | |
285 | 281 | | |
286 | 282 | | |
287 | | - | |
| 283 | + | |
288 | 284 | | |
289 | 285 | | |
290 | | - | |
291 | 286 | | |
292 | 287 | | |
293 | 288 | | |
| |||
473 | 468 | | |
474 | 469 | | |
475 | 470 | | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | 471 | | |
526 | 472 | | |
527 | 473 | | |
| |||
663 | 609 | | |
664 | 610 | | |
665 | 611 | | |
666 | | - | |
| 612 | + | |
667 | 613 | | |
668 | 614 | | |
669 | 615 | | |
| |||
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| 409 | + | |
| 410 | + | |
409 | 411 | | |
410 | | - | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
411 | 418 | | |
412 | 419 | | |
413 | 420 | | |
| |||
621 | 628 | | |
622 | 629 | | |
623 | 630 | | |
| 631 | + | |
624 | 632 | | |
625 | 633 | | |
626 | | - | |
| 634 | + | |
627 | 635 | | |
628 | 636 | | |
629 | 637 | | |
| |||
0 commit comments