diff --git a/src/keboola/facebook/api/exponential_backoff.clj b/src/keboola/facebook/api/exponential_backoff.clj index 137de16..46db157 100644 --- a/src/keboola/facebook/api/exponential_backoff.clj +++ b/src/keboola/facebook/api/exponential_backoff.clj @@ -3,14 +3,14 @@ (def time-slot-ms 100) (def truncate 5) -(def MAX_WAIT_TIME (* 1000 60 60 2)) +(def MAX_WAIT_TIME (* 1000 60 60 10)) (defn with-exp-backoff [action!] (loop [c 0 waited 0] (let [slot (* time-slot-ms (dec (Math/pow 2 c)))] (when (> waited MAX_WAIT_TIME) - (runtime/user-error "Polling timeout exceeded:" waited)) + (runtime/user-error (str "Polling timeout exceeded:" waited))) (Thread/sleep slot) (when (not (action!)) (recur (if (>= c truncate) c (inc c)) (+ waited slot))))))