Skip to content

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

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

Added checks for existing long-running tasks on publish#2803
jayoshih merged 3 commits into
learningequality: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

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.

@rtibblesrtibbles left a comment

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.

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

codecovBot commented Jan 15, 2021

Copy link
Copy Markdown

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 FilesCoverage Δ
contentcuration/contentcuration/decorators.py56.60% <50.00%> (-37.60%)⬇️
contentcuration/contentcuration/forms.py69.06% <72.41%> (+20.61%)⬆️
...ntentcuration/contentcuration/db/models/manager.py93.49% <93.33%> (-6.51%)⬇️
contentcuration/contentcuration/api.py92.06% <100.00%> (+1.43%)⬆️
...tentcuration/contentcuration/context_processors.py100.00% <100.00%> (ø)
...tcuration/contentcuration/db/models/expressions.py93.33% <100.00%> (-6.67%)⬇️
...entcuration/contentcuration/db/models/functions.py100.00% <100.00%> (ø)
...ation/contentcuration/tests/test_rest_framework.py36.93% <0.00%> (-63.07%)⬇️
contentcuration/contentcuration/utils/format.py21.05% <0.00%> (-49.54%)⬇️
contentcuration/contentcuration/utils/cache.py31.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:hotfixesJan 15, 2021
Sign up for freeto 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

@jayoshih@rtibbles