summaryrefslogtreecommitdiffstats
path: root/apps/lookup_server_connector
diff options
context:
space:
mode:
Diffstat (limited to 'apps/lookup_server_connector')
-rw-r--r--apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php24
1 files changed, 17 insertions, 7 deletions
diff --git a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
index 242b0c713fe..3bad504e45f 100644
--- a/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
+++ b/apps/lookup_server_connector/lib/BackgroundJobs/RetryJob.php
@@ -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,
[