Skip to content

Added checks for existing long-running tasks on publish#2803

Merged
jayoshih merged 3 commits intolearningequality:hotfixesfrom
jayoshih:publishing
Jan 15, 2021
Merged

Added checks for existing long-running tasks on publish#2803
jayoshih merged 3 commits intolearningequality:hotfixesfrom
jayoshih:publishing

Conversation

@jayoshih
Copy link
Copy Markdown
Contributor

Queries task model to see if there are any blocking tasks we need to wait for

@jayoshih jayoshih requested a review from kollivier January 15, 2021 19:20
manifest_collection = cc.File.objects.filter(contentnode=ccnode, preset_id=u"slideshow_manifest")
assert len(manifest_collection) == 1

def test_blocking_task_detection(self):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to actually generate the user that you are using here to assign user_id, this is causing the test failures.

Copy link
Copy Markdown
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just needs the test fix. Ran them locally with setting a user that had been created using the testdata user function, and they passed fine.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 15, 2021

Codecov Report

Merging #2803 (2d9b036) into hotfixes (28587f8) will increase coverage by 4.05%.
The diff coverage is 88.73%.

Impacted file tree graph

@@             Coverage Diff              @@
##           hotfixes    #2803      +/-   ##
============================================
+ Coverage     80.80%   84.85%   +4.05%     
============================================
  Files           281      292      +11     
  Lines         12659    15338    +2679     
============================================
+ Hits          10229    13015    +2786     
+ Misses         2430     2323     -107     
Impacted Files Coverage Δ
contentcuration/contentcuration/decorators.py 56.60% <50.00%> (-37.60%) ⬇️
contentcuration/contentcuration/forms.py 69.06% <72.41%> (+20.61%) ⬆️
...ntentcuration/contentcuration/db/models/manager.py 93.49% <93.33%> (-6.51%) ⬇️
contentcuration/contentcuration/api.py 92.06% <100.00%> (+1.43%) ⬆️
...tentcuration/contentcuration/context_processors.py 100.00% <100.00%> (ø)
...tcuration/contentcuration/db/models/expressions.py 93.33% <100.00%> (-6.67%) ⬇️
...entcuration/contentcuration/db/models/functions.py 100.00% <100.00%> (ø)
...ation/contentcuration/tests/test_rest_framework.py 36.93% <0.00%> (-63.07%) ⬇️
contentcuration/contentcuration/utils/format.py 21.05% <0.00%> (-49.54%) ⬇️
contentcuration/contentcuration/utils/cache.py 31.70% <0.00%> (-31.93%) ⬇️
... and 173 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 12ca6fc...2d9b036. Read the comment docs.

@jayoshih jayoshih merged commit cced7c6 into learningequality:hotfixes Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants