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
39
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
cc6b461c
Commit
cc6b461c
authored
1 hour ago
by
Mark Harding
Browse files
Options
Download
(chore): for now, do not send notifications
parent
05dc7e13
epic/transcoder-improvements
1 merge request
!414
New transcoder
Pipeline
#102335803
failed with stages
in 43 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
30 deletions
+30
-30
Core/Media/Video/Transcoder/Delegates/NotificationDelegate.php
View file @
cc6b461c
...
...
@@ -42,9 +42,9 @@ class NotificationDelegate
$status
=
$this
->
transcodeStates
->
getStatus
(
$video
);
if
(
$status
===
TranscodeStates
::
COMPLETED
)
{
$this
->
emitCompletedNotification
(
$video
);
//
$this->emitCompletedNotification($video);
}
elseif
(
$status
===
TranscodeStates
::
FAILED
)
{
$this
->
emitFailedNotification
(
$video
);
//
$this->emitFailedNotification($video);
}
}
...
...
This diff is collapsed.
Spec/Core/Media/Video/Transcoder/Delegates/NotificationDelegateSpec.php
View file @
cc6b461c
...
...
@@ -41,43 +41,43 @@ class NotificationDelegateSpec extends ObjectBehavior
$this
->
shouldHaveType
(
NotificationDelegate
::
class
);
}
public
function
it_should_send_notification_of_completed
()
{
$transcode
=
new
Transcode
();
$transcode
->
setGuid
(
'123'
);
//
public function it_should_send_notification_of_completed()
//
{
//
$transcode = new Transcode();
//
$transcode->setGuid('123');
$this
->
mockFetchVideo
();
//
$this->mockFetchVideo();
$this
->
transcodeStates
->
getStatus
(
Argument
::
that
(
function
(
$video
)
{
return
$video
->
getGuid
()
===
'123'
;
}))
->
shouldBeCalled
()
->
willReturn
(
'completed'
);
//
$this->transcodeStates->getStatus(Argument::that(function ($video) {
//
return $video->getGuid() === '123';
//
}))
//
->shouldBeCalled()
//
->willReturn('completed');
$this
->
eventsDispatcher
->
trigger
(
'notification'
,
'transcoder'
,
Argument
::
type
(
'array'
))
->
shouldBeCalled
();
//
$this->eventsDispatcher->trigger('notification', 'transcoder', Argument::type('array'))
//
->shouldBeCalled();
$this
->
onTranscodeCompleted
(
$transcode
);
}
//
$this->onTranscodeCompleted($transcode);
//
}
public
function
it_should_send_notification_of_failed
()
{
$transcode
=
new
Transcode
();
$transcode
->
setGuid
(
'123'
);
//
public function it_should_send_notification_of_failed()
//
{
//
$transcode = new Transcode();
//
$transcode->setGuid('123');
$this
->
mockFetchVideo
();
//
$this->mockFetchVideo();
$this
->
transcodeStates
->
getStatus
(
Argument
::
that
(
function
(
$video
)
{
return
$video
->
getGuid
()
===
'123'
;
}))
->
shouldBeCalled
()
->
willReturn
(
'failed'
);
//
$this->transcodeStates->getStatus(Argument::that(function ($video) {
//
return $video->getGuid() === '123';
//
}))
//
->shouldBeCalled()
//
->willReturn('failed');
$this
->
eventsDispatcher
->
trigger
(
'notification'
,
'transcoder'
,
Argument
::
type
(
'array'
))
->
shouldBeCalled
();
//
$this->eventsDispatcher->trigger('notification', 'transcoder', Argument::type('array'))
//
->shouldBeCalled();
$this
->
onTranscodeCompleted
(
$transcode
);
}
//
$this->onTranscodeCompleted($transcode);
//
}
public
function
it_should_do_nothing
()
{
...
...
This diff is collapsed.
Please
register
or
sign in
to comment