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
c180070a
Commit
c180070a
authored
4 years ago
by
Jeff LaJoie
Browse files
Options
Downloads
Patches
Plain Diff
Fixes serialization of course key for celery in course updates command
parent
5e7cd2f8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openedx/core/djangoapps/schedules/resolvers.py
+5
-3
5 additions, 3 deletions
openedx/core/djangoapps/schedules/resolvers.py
openedx/core/djangoapps/schedules/tasks.py
+2
-2
2 additions, 2 deletions
openedx/core/djangoapps/schedules/tasks.py
with
7 additions
and
5 deletions
openedx/core/djangoapps/schedules/resolvers.py
+
5
−
3
View file @
c180070a
...
...
@@ -14,6 +14,7 @@ from edx_ace.recipient import Recipient
from
edx_ace.recipient_resolver
import
RecipientResolver
from
edx_django_utils.monitoring
import
function_trace
,
set_custom_metric
from
edx_when.api
import
get_schedules_with_due_date
from
opaque_keys.edx.keys
import
CourseKey
from
lms.djangoapps.courseware.utils
import
verified_upgrade_deadline_link
,
can_show_verified_upgrade
from
lms.djangoapps.discussion.notification_prefs.views
import
UsernameCipher
...
...
@@ -426,7 +427,7 @@ class CourseNextSectionUpdate(PrefixedDebugLoggerMixin, RecipientResolver):
async_send_task
=
attr
.
ib
()
site
=
attr
.
ib
()
target_datetime
=
attr
.
ib
()
course_
key
=
attr
.
ib
()
course_
id
=
attr
.
ib
()
override_recipient_email
=
attr
.
ib
(
default
=
None
)
log_prefix
=
'
Next Section Course Update
'
...
...
@@ -447,7 +448,7 @@ class CourseNextSectionUpdate(PrefixedDebugLoggerMixin, RecipientResolver):
LOG
.
info
(
u
'
Sending email to user: {} for course-key: {}
'
.
format
(
user
.
username
,
self
.
course_
key
self
.
course_
id
)
)
# TODO: Uncomment below when going live
...
...
@@ -455,8 +456,9 @@ class CourseNextSectionUpdate(PrefixedDebugLoggerMixin, RecipientResolver):
# self.async_send_task.apply_async((self.site.id, str(msg)), retry=False)
def
get_schedules
(
self
):
course_key
=
CourseKey
.
from_string
(
self
.
course_id
)
target_date
=
self
.
target_datetime
.
date
()
schedules
=
get_schedules_with_due_date
(
self
.
course_key
,
target_date
).
filter
(
schedules
=
get_schedules_with_due_date
(
course_key
,
target_date
).
filter
(
self
.
experience_filter
,
active
=
True
,
enrollment__user__is_active
=
True
,
...
...
This diff is collapsed.
Click to expand it.
openedx/core/djangoapps/schedules/tasks.py
+
2
−
2
View file @
c180070a
...
...
@@ -224,7 +224,7 @@ class ScheduleCourseNextSectionUpdate(ScheduleMessageBaseTask):
task_args
=
(
site
.
id
,
serialize
(
target_datetime
),
# Need to leave as a datetime for serialization purposes here
course_key
,
str
(
course_key
),
# Needs to be a string for celery to properly process
override_recipient_email
,
)
cls
.
log_info
(
u
'
Launching task with args = %r
'
,
task_args
)
...
...
@@ -241,7 +241,7 @@ class ScheduleCourseNextSectionUpdate(ScheduleMessageBaseTask):
self
.
async_send_task
,
site
,
deserialize
(
target_day_str
),
course_key
,
str
(
course_key
)
,
override_recipient_email
,
).
send
()
...
...
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