Skip to content

Commit 8117dcd

Browse files
authored
Merge pull request #9 from keboola/odin-PS-2487
fix: add long processing event
2 parents 33affb8 + 12893aa commit 8117dcd

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/Requests/Subscription.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Keboola\NotificationClient\ClientFactory;
99
use Keboola\NotificationClient\Exception\ClientException;
1010
use Keboola\NotificationClient\Requests\PostEvent\JobFailedEventData;
11+
use Keboola\NotificationClient\Requests\PostEvent\JobProcessingLongEventData;
1112
use Keboola\NotificationClient\Requests\PostEvent\JobSucceededWithWarningEventData;
1213
use Keboola\NotificationClient\Requests\PostSubscription\EmailRecipient;
1314
use Keboola\NotificationClient\Requests\PostSubscription\Filter;
@@ -54,6 +55,7 @@ private function checkEventType(string $eventType): void
5455
$validEventTypes = [
5556
JobFailedEventData::getEventTypeName(),
5657
JobSucceededWithWarningEventData::getEventTypeName(),
58+
JobProcessingLongEventData::getEventTypeName(),
5759
];
5860

5961
if (!in_array($eventType, $validEventTypes)) {

tests/SubscriptionClientFunctionalTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public function testCreateInvalidSubscription(): void
4545
$client = $this->getClient();
4646
self::expectException(ClientException::class);
4747
self::expectExceptionMessage(
48-
'Invalid event type "dummy-event", valid types are: "job-failed, job-succeeded-with-warning".'
48+
'Invalid event type "dummy-event", valid types are: ' .
49+
'"job-failed, job-succeeded-with-warning, job-processing-long".'
4950
);
5051
$client->createSubscription(new Subscription(
5152
'dummy-event',

0 commit comments

Comments
 (0)