Skip to content
Snippets Groups Projects
Unverified Commit c9d97347 authored by adeelehsan's avatar adeelehsan Committed by GitHub
Browse files

Merge pull request #19856 from edx/aehsan/LEARNER-6943/adding_logs_for_cached_data

Adding Logs
parents 11edfd69 84d2ab76
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,8 @@ def get_edx_api_data(api_config, resource, api, resource_id=None, querystring=No
cached = cache.get(cache_key)
if cached:
log.info("Cached course run was returned for the course: {resource_id}".format(resource_id=resource_id))
log.info("Cached course run was returned for the course: {resource_id} and response is {cached} ".
format(resource_id=resource_id, cached=zunpickle(cached)))
return zunpickle(cached)
try:
......@@ -63,8 +64,9 @@ def get_edx_api_data(api_config, resource, api, resource_id=None, querystring=No
querystring = querystring if querystring else {}
log.info("Hitting discovery for course run:{resource_id}".format(resource_id=resource_id))
response = endpoint(resource_id).get(**querystring)
log.info("Response from discovery: {response} for the course: {resource_id}".format(response=response,
resource_id=resource_id))
log.info("Response for the course: {resource_id} from discovery: {response} ".
format(resource_id=resource_id, response=response))
if resource_id is not None:
if fields:
results = get_fields(fields, response)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment