Also send a delete like on the syncronous action

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2019-04-17 15:37:23 +02:00 committed by Morris Jobke
parent 3930b91511
commit 3a4f6302ca
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 17 additions and 7 deletions

View File

@ -85,13 +85,23 @@ class RetryJob extends Job {
$client = $this->clientService->newClient();
try {
$client->post($this->lookupServer,
[
'body' => json_encode($argument['dataArray']),
'timeout' => 10,
'connect_timeout' => 3,
]
);
if (count($argument['dataArray']) === 1) {
$client->delete($this->lookupServer,
[
'body' => json_encode($argument['dataArray']),
'timeout' => 10,
'connect_timeout' => 3,
]
);
} else {
$client->post($this->lookupServer,
[
'body' => json_encode($argument['dataArray']),
'timeout' => 10,
'connect_timeout' => 3,
]
);
}
} catch (\Exception $e) {
$this->jobList->add(RetryJob::class,
[