Skip to content

Commit 50a66ec

Browse files
committed
Add logging
1 parent 7b8bc6f commit 50a66ec

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ckanext/datapusher_plus/jobs.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ def _push_to_datastore(
224224
api_token = utils.get_dp_plus_user_apitoken()
225225
headers["Authorization"] = api_token
226226

227+
logger.debug("DEBUG: A: "+repr(headers)) # DEBUG
228+
227229
# If the ckan_url differs from this url, rewrite this url to the ckan
228230
# url. This can be useful if ckan is behind a firewall.
229231
if not resource_url.startswith(ckan_url):
@@ -247,8 +249,16 @@ def _push_to_datastore(
247249
"http": conf.DOWNLOAD_PROXY,
248250
"https": conf.DOWNLOAD_PROXY,
249251
}
252+
253+
logger.debug("DEBUG: B: "+repr(resource_url)) # DEBUG
254+
logger.debug("DEBUG: B: "+repr( kwargs)) # DEBUG
255+
256+
257+
250258
with requests.get(resource_url, **kwargs) as response:
251259
response.raise_for_status()
260+
logger.debug("DEBUG: C: "+repr(response)) # DEBUG
261+
252262

253263
cl = response.headers.get("content-length")
254264
max_content_length = conf.MAX_CONTENT_LENGTH

0 commit comments

Comments
 (0)