From 2304daa11743e161797f51b85947e9d6e724bcc8 Mon Sep 17 00:00:00 2001 From: Gilles Ramstein <43049114+GillesRamstein@users.noreply.github.com> Date: Mon, 25 Aug 2025 20:32:48 +0200 Subject: [PATCH 1/2] Update updater.R run tasks scheduled with the later package in the polling loop --- R/updater.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/updater.R b/R/updater.R index b16b2b9..f3ab4cd 100644 --- a/R/updater.R +++ b/R/updater.R @@ -47,6 +47,7 @@ start_polling <- function(timeout = 10L, } while (private$running) { + later::run_now() updates <- tryCatch( { self$bot$get_updates( From 6899dc99a105358a7458ad8cafea931f230598e9 Mon Sep 17 00:00:00 2001 From: Gilles Ramstein <43049114+GillesRamstein@users.noreply.github.com> Date: Wed, 17 Sep 2025 20:18:05 +0200 Subject: [PATCH 2/2] Update updater.R Wrap later::run_now() in tryCatch --- R/updater.R | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/R/updater.R b/R/updater.R index f3ab4cd..dd4cabc 100644 --- a/R/updater.R +++ b/R/updater.R @@ -47,7 +47,15 @@ start_polling <- function(timeout = 10L, } while (private$running) { - later::run_now() + tryCatch( + { + later::run_now() + }, + error = function(e) { + warning("Error in scheduled task: ", e$message) + } + ) + updates <- tryCatch( { self$bot$get_updates(