Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package registry
Container registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
videoag
backend
Commits
f6bc150e
Commit
f6bc150e
authored
2 weeks ago
by
Simon Künzel
Browse files
Options
Downloads
Patches
Plain Diff
Fix lecture media duration not being updated properly
parent
350af25b
No related branches found
No related tags found
No related merge requests found
Pipeline
#7859
passed
2 weeks ago
Stage: build
Stage: run
Pipeline: backend
#7860
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
job_controller/jobs/media_process_scheduler/job.py
+4
-2
4 additions, 2 deletions
job_controller/jobs/media_process_scheduler/job.py
with
4 additions
and
2 deletions
job_controller/jobs/media_process_scheduler/job.py
+
4
−
2
View file @
f6bc150e
...
@@ -108,8 +108,6 @@ class ProcessScheduler:
...
@@ -108,8 +108,6 @@ class ProcessScheduler:
if
self
.
_process
.
publish_wait_for_full_process
and
missing_targets
:
if
self
.
_process
.
publish_wait_for_full_process
and
missing_targets
:
return
return
publish_media_to_delete_due_to_metadata_conflicts
=
[]
# Publish new media
# Publish new media
for
target_id
in
self
.
_process
.
publish_target_ids
:
for
target_id
in
self
.
_process
.
publish_target_ids
:
if
target_id
not
in
self
.
_produced_media
:
if
target_id
not
in
self
.
_produced_media
:
...
@@ -165,6 +163,10 @@ class ProcessScheduler:
...
@@ -165,6 +163,10 @@ class ProcessScheduler:
f
"
Publishing
{
target_id
}
(metadata
{
new_metadata
.
id
}
) by creating a
"
f
"
Publishing
{
target_id
}
(metadata
{
new_metadata
.
id
}
) by creating a
"
f
"
new publish medium
"
)
f
"
new publish medium
"
)
# Lecture doesn't know about the new publish media and that relationship is readonly. So we do a refresh.
self
.
_session
.
flush
()
self
.
_session
.
refresh
(
self
.
_lecture
,
[
"
publish_media
"
])
# Delete old publish media
# Delete old publish media
for
publish_medium
in
self
.
_lecture
.
publish_media
:
for
publish_medium
in
self
.
_lecture
.
publish_media
:
assert
isinstance
(
publish_medium
.
medium_metadata
,
MediumMetadata
)
assert
isinstance
(
publish_medium
.
medium_metadata
,
MediumMetadata
)
...
...
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