1
0
Fork 0

Update DeleteWorker, remove cache lock

This commit is contained in:
Daniel Supernault 2022-08-31 20:57:20 -06:00
parent 61f230aa9e
commit 6d6a033a54
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 21 additions and 29 deletions

View File

@ -72,13 +72,6 @@ class DeleteWorker implements ShouldQueue
'b:' . base64_encode($actor) :
'h:' . hash('sha256', $actor);
$lockKey = 'ap:inbox:actor-delete-exists:lock:' . $hash;
Cache::lock($lockKey, 30)->block(15, function () use(
$headers,
$payload,
$actor,
$hash
) {
$key = 'ap:inbox:actor-delete-exists:' . $hash;
$actorDelete = Cache::remember($key, now()->addMinutes(15), function() use($actor) {
return Profile::whereRemoteUrl($actor)
@ -104,7 +97,6 @@ class DeleteWorker implements ShouldQueue
// Remote user doesn't exist, exit early.
return 1;
}
});
return 1;
}