mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 08:13:16 +00:00
Update DeleteWorker pipeline, increase timeout
This commit is contained in:
parent
5ea12601ce
commit
247c9ec5f8
1 changed files with 11 additions and 10 deletions
|
@ -24,8 +24,9 @@ class DeleteWorker implements ShouldQueue
|
||||||
protected $headers;
|
protected $headers;
|
||||||
protected $payload;
|
protected $payload;
|
||||||
|
|
||||||
public $timeout = 60;
|
public $timeout = 120;
|
||||||
public $tries = 1;
|
public $tries = 3;
|
||||||
|
public $maxExceptions = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
|
@ -72,7 +73,7 @@ class DeleteWorker implements ShouldQueue
|
||||||
'h:' . hash('sha256', $actor);
|
'h:' . hash('sha256', $actor);
|
||||||
|
|
||||||
$lockKey = 'ap:inbox:actor-delete-exists:lock:' . $hash;
|
$lockKey = 'ap:inbox:actor-delete-exists:lock:' . $hash;
|
||||||
Cache::lock($lockKey, 10)->block(5, function () use(
|
Cache::lock($lockKey, 30)->block(15, function () use(
|
||||||
$headers,
|
$headers,
|
||||||
$payload,
|
$payload,
|
||||||
$actor,
|
$actor,
|
||||||
|
@ -94,30 +95,30 @@ class DeleteWorker implements ShouldQueue
|
||||||
if($profile) {
|
if($profile) {
|
||||||
DeleteRemoteProfilePipeline::dispatch($profile)->onQueue('delete');
|
DeleteRemoteProfilePipeline::dispatch($profile)->onQueue('delete');
|
||||||
}
|
}
|
||||||
return;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
// Signature verification failed, exit.
|
// Signature verification failed, exit.
|
||||||
return;
|
return 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Remote user doesn't exist, exit early.
|
// Remote user doesn't exist, exit early.
|
||||||
return;
|
return 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$profile = null;
|
$profile = null;
|
||||||
|
|
||||||
if($this->verifySignature($headers, $payload) == true) {
|
if($this->verifySignature($headers, $payload) == true) {
|
||||||
(new Inbox($headers, $profile, $payload))->handle();
|
(new Inbox($headers, $profile, $payload))->handle();
|
||||||
return;
|
return 1;
|
||||||
} else if($this->blindKeyRotation($headers, $payload) == true) {
|
} else if($this->blindKeyRotation($headers, $payload) == true) {
|
||||||
(new Inbox($headers, $profile, $payload))->handle();
|
(new Inbox($headers, $profile, $payload))->handle();
|
||||||
return;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue