Skip to content

Commit

Permalink
add more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kacurez committed Aug 22, 2024
1 parent 913a0c6 commit ab5bd2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/keboola/facebook/api/request.clj
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
(not (clojure.string/includes? next-url "until="))))
stop-on-empty-response-valid (or (not stop-on-empty-response?)
(not (-> response :data empty?)))]
(if (not stop-on-empty-response-valid) (log-strings "Found empty data response, stopping pagintaion."))
(if (and time-base-pagination-valid stop-on-empty-response-valid)
next-url)))

Expand Down Expand Up @@ -191,6 +192,7 @@
sanitized-path (keyword (string/replace path #"/" "_"))]

(log-strings "calling" full-url "with" preparsed-fields ids preparsed-since preparsed-until)
(if stop-on-empty-response? (log-strings "Stop on empty response is enabled."))
(if (some? ids)
(mapcat
#(page-and-collect
Expand Down Expand Up @@ -235,6 +237,7 @@
response (make-get-request url)
response-body (:body response)]
;(println "response-body" response-body)
(if stop-on-empty-response? (log-strings "Stop on empty response is enabled."))
(page-and-collect
{:ex-account-id ad-account-id
:parent-id ad-account-id
Expand Down

0 comments on commit ab5bd2a

Please sign in to comment.