Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
538da996
Commit
538da996
authored
Jun 07, 2017
by
Adam
Committed by
GitHub
Jun 07, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15268 from edx/adam/update-fail-task-command
aesthetic changes to command to mark old tasks as failures
parents
4e9d41f2
899e0f93
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
lms/djangoapps/instructor_task/management/commands/fail_old_tasks.py
+10
-4
No files found.
lms/djangoapps/instructor_task/management/commands/fail_old_tasks.py
View file @
538da996
...
...
@@ -91,7 +91,8 @@ class Command(BaseCommand):
for
task
in
tasks
:
print
(
"Queueing task '{task_id}', of type '{task_type}', created on '{created}', will be marked as 'FAILURE'"
.
format
(
"{task_state} task '{task_id}', of type '{task_type}', created on '{created}', will be marked as 'FAILURE'"
.
format
(
task_state
=
task
.
task_state
,
task_id
=
task
.
task_id
,
task_type
=
task
.
task_type
,
created
=
task
.
created
,
...
...
@@ -103,7 +104,12 @@ class Command(BaseCommand):
task_state
=
FAILURE
,
)
print
(
"{tasks_updated} records updated."
.
format
(
tasks_updated
=
tasks_updated
)
)
tasks_updated
=
tasks_updated
)
)
else
:
print
(
"This was a dry run, so no records were updated."
)
print
(
"This was a dry run, so no records were updated. "
"If this command were run for real, {number} records would have been updated."
.
format
(
number
=
tasks
.
count
()
)
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment