Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
c9d97347
Unverified
Commit
c9d97347
authored
6 years ago
by
adeelehsan
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #19856 from edx/aehsan/LEARNER-6943/adding_logs_for_cached_data
Adding Logs
parents
11edfd69
84d2ab76
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openedx/core/lib/edx_api_utils.py
+5
-3
5 additions, 3 deletions
openedx/core/lib/edx_api_utils.py
with
5 additions
and
3 deletions
openedx/core/lib/edx_api_utils.py
+
5
−
3
View file @
c9d97347
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment