Skip to content

Commit

Permalink
Add logs to event restoring.
Browse files Browse the repository at this point in the history
  • Loading branch information
klauswuestefeld committed Mar 27, 2024
1 parent dc33fb7 commit 66fe5db
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/prevayler_clj_aws/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,18 @@

(defn- read-items [dynamo-cli table partkey page-size]
(letfn [(read-page [exclusive-start-key]
(let [result (util/aws-invoke
(let [_ (println "Reading page" exclusive-start-key)
result (util/aws-invoke
dynamo-cli
{:op :Query
:request {:TableName table
:KeyConditionExpression "partkey = :partkey"
:ExpressionAttributeValues {":partkey" {:N (str partkey)}}
:Limit page-size
:ExclusiveStartKey exclusive-start-key}})
{items :Items last-key :LastEvaluatedKey} result]
{items :Items last-key :LastEvaluatedKey} result
_ (println "Read" (count items) "items. last-key:" last-key)]

(lazy-cat
(map (comp unmarshal :B :content) items)
(if (seq last-key)
Expand Down

0 comments on commit 66fe5db

Please sign in to comment.