summaryrefslogtreecommitdiffstats
path: root/apps/lookup_server_connector
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-04-17 15:37:23 +0200
committerMorris Jobke <hey@morrisjobke.de>2019-07-18 11:24:35 +0200
commit3a4f6302ca415206e34de355289a211b9afa0e6f (patch)
treeb30df33142b6e4a4631e23d5a0741845222d0bdb /apps/lookup_server_connector
parent3930b915116b27816c4c6bee4bab7c6193369e68 (diff)
downloadnextcloud-server-3a4f6302ca415206e34de355289a211b9afa0e6f.tar.gz
nextcloud-server-3a4f6302ca415206e34de355289a211b9afa0e6f.zip
Also send a delete like on the syncronous action
Signed-off-by: Joas Schilling <coding@schilljs.com>
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,
[