Skip to content

Commit 2d8b396

Browse files
author
brunoroux
committed
renamed notification_retry_delay to notification_retries_delay as in API v3
1 parent 866ab62 commit 2d8b396

3 files changed

Lines changed: 20 additions & 18 deletions

File tree

src/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ private function getQueuesNode()
148148
->info('How many attempts the Push Notifications are retried if the Subscriber returns an error')
149149
->example(3)
150150
->end()
151-
->scalarNode('notification_retry_delay')
151+
->scalarNode('notification_retries_delay')
152152
->defaultValue(60)
153153
->info('Delay between each Push Notification retry in seconds')
154154
->example(3)

src/Provider/IronMqProvider.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,13 @@ public function create()
7171
{
7272
if ($this->options['push_notifications']) {
7373
$params = [
74-
'push_type' => 'multicast',
75-
'rate_limit' => $this->options['rate_limit'],
76-
'retries' => $this->options['notification_retries'],
77-
'retry_delay' => $this->options['notification_retry_delay'],
78-
'subscribers' => []
74+
'push_type' => 'multicast',
75+
'push' => [
76+
'rate_limit' => $this->options['rate_limit'],
77+
'retries' => $this->options['notification_retries'],
78+
'retries_delay' => $this->options['notification_retries_delay'],
79+
'subscribers' => []
80+
]
7981
];
8082

8183
foreach ($this->options['subscribers'] as $subscriber) {
@@ -85,7 +87,7 @@ public function create()
8587
);
8688
}
8789

88-
$params['subscribers'][] = ['url' => $subscriber['endpoint']];
90+
$params['push']['subscribers'][] = ['url' => $subscriber['endpoint']];
8991
}
9092

9193
} else {

tests/Provider/IronMqProviderTest.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ private function getIronMqProvider(array $options = [])
5858
{
5959
$options = array_merge(
6060
[
61-
'logging_enabled' => false,
62-
'push_notifications' => true,
63-
'notification_retries' => 3,
64-
'notification_retry_delay' => 60,
65-
'message_delay' => 0,
66-
'message_timeout' => 30,
67-
'message_expiration' => 604800,
68-
'messages_to_receive' => 1,
69-
'rate_limit' => -1,
70-
'receive_wait_time' => 3,
71-
'subscribers' => [
61+
'logging_enabled' => false,
62+
'push_notifications' => true,
63+
'notification_retries' => 3,
64+
'notification_retries_delay' => 60,
65+
'message_delay' => 0,
66+
'message_timeout' => 30,
67+
'message_expiration' => 604800,
68+
'messages_to_receive' => 1,
69+
'rate_limit' => -1,
70+
'receive_wait_time' => 3,
71+
'subscribers' => [
7272
[ 'protocol' => 'http', 'endpoint' => 'http://fake.com' ]
7373
]
7474
],

0 commit comments

Comments
 (0)