From 02abe1dba9afa241f89e098790e6a6b28dd108d7 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Thu, 30 Mar 2023 11:14:08 -0700 Subject: [PATCH] (cloud) Improvements in logging when restoring backup --- src/clj/auto_ap/jobs/restore_from_backup.clj | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/clj/auto_ap/jobs/restore_from_backup.clj b/src/clj/auto_ap/jobs/restore_from_backup.clj index fae9d756..ad7f237c 100644 --- a/src/clj/auto_ap/jobs/restore_from_backup.clj +++ b/src/clj/auto_ap/jobs/restore_from_backup.clj @@ -44,9 +44,10 @@ (def loaded (atom #{})) (defn upsert-batch - [batch] + [batch context] (de/future-with request-pool - (transact-with-backoff batch) + (mu/with-context context + (transact-with-backoff batch)) batch)) (defn pull-file [backup which] @@ -83,8 +84,10 @@ (when @die? (reset! die? false) (throw (Exception. "dead"))) - (upsert-batch entities))) - (s/buffer 50) + (upsert-batch entities {:entity entity + :service "restore-from-backup" + :background-job "restore-from-backup"}))) + (s/buffer 20) (s/realize-each))) (swap! loaded conj entity))))