Skip to content

Commit edd9cc4

Browse files
committed
laravel 6
1 parent 156fdcf commit edd9cc4

File tree

3 files changed

+11
-16
lines changed

3 files changed

+11
-16
lines changed

.travis.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
language: php
22

33
php:
4-
- 7.1
54
- 7.2
65
- 7.3
76

8-
env:
9-
- DOCKER_COMPOSE_VERSION=1.23.2
10-
117
services:
128
- docker
139

@@ -17,7 +13,7 @@ cache:
1713

1814
before_install:
1915
- sudo rm /usr/local/bin/docker-compose
20-
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
16+
- curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` > docker-compose
2117
- chmod +x docker-compose
2218
- sudo mv docker-compose /usr/local/bin
2319

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
}
1010
],
1111
"require": {
12-
"php": "^7.1.3",
12+
"php": "^7.2",
1313
"ext-json": "*",
14-
"illuminate/database": "5.7.*|5.8.*",
15-
"illuminate/support": "5.7.*|5.8.*",
16-
"illuminate/queue": "5.7.*|5.8.*",
14+
"illuminate/database": "^6.0",
15+
"illuminate/support": "^6.0",
16+
"illuminate/queue": "^6.0",
1717
"enqueue/amqp-lib": "0.9.*",
1818
"queue-interop/amqp-interop": "0.8.*"
1919
},
2020
"require-dev": {
2121
"phpunit/phpunit": "^7.0",
22-
"illuminate/events": "5.7.*|5.8.*",
22+
"illuminate/events": "^6.0",
2323
"mockery/mockery": "^1.0",
2424
"laravel/horizon": "^3.0"
2525
},
@@ -35,7 +35,7 @@
3535
},
3636
"extra": {
3737
"branch-alias": {
38-
"dev-master": "8.0-dev"
38+
"dev-master": "9.0-dev"
3939
},
4040
"laravel": {
4141
"providers": [

src/Queue/Jobs/RabbitMQJob.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
use Interop\Amqp\AmqpConsumer;
1010
use Illuminate\Queue\Jobs\JobName;
1111
use Illuminate\Container\Container;
12-
use Illuminate\Database\DetectsDeadlocks;
12+
use Illuminate\Database\DetectsLostConnections;
1313
use Illuminate\Contracts\Queue\Job as JobContract;
1414
use VladimirYuldashev\LaravelQueueRabbitMQ\Queue\RabbitMQQueue;
1515
use VladimirYuldashev\LaravelQueueRabbitMQ\Horizon\RabbitMQQueue as HorizonRabbitMQQueue;
1616

1717
class RabbitMQJob extends Job implements JobContract
1818
{
19-
use DetectsDeadlocks;
19+
use DetectsLostConnections;
2020

2121
/**
2222
* Same as RabbitMQQueue, used for attempt counts.
@@ -58,7 +58,7 @@ public function fire(): void
5858
with($this->instance = $this->resolve($class))->{$method}($this, $payload['data']);
5959
} catch (Exception $exception) {
6060
if (
61-
$this->causedByDeadlock($exception) ||
61+
$this->causedByLostConnection($exception) ||
6262
Str::contains($exception->getMessage(), ['detected deadlock'])
6363
) {
6464
sleep(2);
@@ -136,7 +136,6 @@ public function release($delay = 0): void
136136
* Get the job identifier.
137137
*
138138
* @return string
139-
* @throws \Interop\Queue\Exception
140139
*/
141140
public function getJobId(): string
142141
{
@@ -171,7 +170,7 @@ protected function unserialize(array $body)
171170
return unserialize($body['data']['command']);
172171
} catch (Exception $exception) {
173172
if (
174-
$this->causedByDeadlock($exception) ||
173+
$this->causedByLostConnection($exception) ||
175174
Str::contains($exception->getMessage(), ['detected deadlock'])
176175
) {
177176
sleep(2);

0 commit comments

Comments
 (0)