forked from mirror/pixelfed
Update DeleteWorker, remove cache lock
This commit is contained in:
parent
61f230aa9e
commit
6d6a033a54
|
@ -72,13 +72,6 @@ class DeleteWorker implements ShouldQueue
|
||||||
'b:' . base64_encode($actor) :
|
'b:' . base64_encode($actor) :
|
||||||
'h:' . hash('sha256', $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;
|
$key = 'ap:inbox:actor-delete-exists:' . $hash;
|
||||||
$actorDelete = Cache::remember($key, now()->addMinutes(15), function() use($actor) {
|
$actorDelete = Cache::remember($key, now()->addMinutes(15), function() use($actor) {
|
||||||
return Profile::whereRemoteUrl($actor)
|
return Profile::whereRemoteUrl($actor)
|
||||||
|
@ -104,7 +97,6 @@ class DeleteWorker implements ShouldQueue
|
||||||
// Remote user doesn't exist, exit early.
|
// Remote user doesn't exist, exit early.
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue