From e73fd80b689d4d5cdc803fe92775bb9551a44df4 Mon Sep 17 00:00:00 2001 From: Ivar Refsdal Date: Mon, 28 Mar 2022 20:34:13 +0200 Subject: Another bugfix: schedules should be using milliseconds and not nanoseconds. --- README.md | 3 +++ src/com/github/ivarref/yoltq.clj | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d2ae4d3..465a0cf 100644 --- a/README.md +++ b/README.md @@ -333,6 +333,9 @@ easier. ## Change log +### 2022-03-28 v0.2.?? [diff](https://github.com/ivarref/yoltq/compare/v0.2.51...v0.2.??) +Fixed: Schedules should now be using milliseconds and not nanoseconds. + ### 2022-03-28 v0.2.51 [diff](https://github.com/ivarref/yoltq/compare/v0.2.48...v0.2.51) * Don't OOM on migrating large amounts of data. * Respect `:auto-migrate? false`. diff --git a/src/com/github/ivarref/yoltq.clj b/src/com/github/ivarref/yoltq.clj index e1fd1b0..7d5434e 100644 --- a/src/com/github/ivarref/yoltq.clj +++ b/src/com/github/ivarref/yoltq.clj @@ -116,8 +116,8 @@ (let [pool @threadpool queue-listener-ready (promise)] (reset! *running?* true) - (.scheduleAtFixedRate pool (fn [] (poller/poll-all-queues! *running?* *config* pool)) 0 poll-delay TimeUnit/NANOSECONDS) - (.scheduleAtFixedRate pool (fn [] (errpoller/poll-errors *running?* *config*)) 0 system-error-poll-delay TimeUnit/NANOSECONDS) + (.scheduleAtFixedRate pool (fn [] (poller/poll-all-queues! *running?* *config* pool)) 0 poll-delay TimeUnit/MILLISECONDS) + (.scheduleAtFixedRate pool (fn [] (errpoller/poll-errors *running?* *config*)) 0 system-error-poll-delay TimeUnit/MILLISECONDS) (.execute pool (fn [] (rq/report-queue-listener *running?* queue-listener-ready pool *config*))) (.execute pool (fn [] (slow-executor/show-slow-threads *running?* *config*))) @queue-listener-ready))) -- cgit v1.2.3