Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
284
Merge Requests
38
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
5b97dadd
Commit
5b97dadd
authored
19 minutes ago
by
Mark Harding
Browse files
Options
Download
(fix): only fire notifications when all transcodes have reached a state
parent
bf6f144e
epic/transcoder-improvements
1 merge request
!414
WIP: New transcoder
Pipeline
#102221704
passed with stages
in 6 minutes and 54 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
Core/Media/Video/Transcoder/TranscodeStates.php
View file @
5b97dadd
...
...
@@ -40,6 +40,7 @@ class TranscodeStates
'guid'
=>
$video
->
getGuid
(),
]);
$total
=
0
;
$created
=
0
;
$failures
=
0
;
$completed
=
0
;
...
...
@@ -48,6 +49,7 @@ class TranscodeStates
if
(
$transcode
instanceof
TranscodeProfiles\Thumbnails
)
{
continue
;
// We skip thumbnails as these are likely to succeed
}
++
$total
;
switch
(
$transcode
->
getStatus
())
{
case
TranscodeStates
::
TRANSCODING
:
if
(
$transcode
->
getLastEventTimestampMs
()
>=
(
time
()
-
Manager
::
TRANSCODER_TIMEOUT_SECS
)
*
1000
)
{
...
...
@@ -75,6 +77,10 @@ class TranscodeStates
return
TranscodeStates
::
CREATED
;
}
if
(
$total
<
(
$completed
+
$failures
))
{
return
TranscodeStates
::
CREATED
;
}
// If we have more completions then failures the declare completed
if
(
$failures
<
$completed
)
{
return
TranscodeStates
::
COMPLETED
;
...
...
This diff is collapsed.
Please
register
or
sign in
to comment