Merge pull request #19856 from edx/aehsan/LEARNER-6943/adding_logs_for_cached_data
Adding Logs
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user