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
a342fa57
Commit
a342fa57
authored
6 years ago
by
Calen Pennington
Browse files
Options
Downloads
Patches
Plain Diff
Serialize the CourseKey before putting into celery task args
parent
2f931338
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/features/course_duration_limits/tasks.py
+5
-4
5 additions, 4 deletions
openedx/features/course_duration_limits/tasks.py
with
5 additions
and
4 deletions
openedx/features/course_duration_limits/tasks.py
+
5
−
4
View file @
a342fa57
...
...
@@ -15,6 +15,7 @@ from edx_ace import ace
from
edx_ace.message
import
Message
from
edx_ace.utils.date
import
deserialize
,
serialize
from
edx_django_utils.monitoring
import
set_custom_metric
from
opaque_keys.edx.keys
import
CourseKey
from
openedx.core.djangoapps.schedules.tasks
import
(
_annonate_send_task_for_monitoring
,
_track_message_sent
...
...
@@ -77,7 +78,7 @@ class CourseDurationLimitMessageBaseTask(LoggedTask):
for
bin_num
in
range
(
cls
.
num_bins
):
task_args
=
(
site
.
id
,
course_key
,
unicode
(
course_key
)
,
serialize
(
target_date
),
day_offset
,
bin_num
,
...
...
@@ -89,17 +90,17 @@ class CourseDurationLimitMessageBaseTask(LoggedTask):
)
def
run
(
# pylint: disable=arguments-differ
self
,
site_id
,
course_key
,
target_day_str
,
day_offset
,
bin_num
,
override_recipient_email
=
None
,
self
,
site_id
,
course_key
_str
,
target_day_str
,
day_offset
,
bin_num
,
override_recipient_email
=
None
,
):
try
:
site
=
Site
.
objects
.
select_related
(
'
configuration
'
).
get
(
id
=
site_id
)
with
emulate_http_request
(
site
=
site
):
msg_type
=
self
.
make_message_type
(
day_offset
)
_annotate_for_monitoring
(
msg_type
,
course_key
,
bin_num
,
target_day_str
,
day_offset
)
_annotate_for_monitoring
(
msg_type
,
course_key
_str
,
bin_num
,
target_day_str
,
day_offset
)
return
self
.
resolver
(
# pylint: disable=not-callable
self
.
async_send_task
,
site
,
course_key
,
CourseKey
.
from_string
(
course_key
_str
)
,
deserialize
(
target_day_str
),
day_offset
,
bin_num
,
...
...
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