Update FederationController, fix double lock bug

pull/4033/head
Daniel Supernault 2022-12-29 03:54:58 -07:00
rodzic de331f2b64
commit 9fcccca910
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 0 dodań i 6 usunięć

Wyświetl plik

@ -178,12 +178,6 @@ class FederationController extends Controller
} else if( isset($obj['type']) && in_array($obj['type'], ['Follow', 'Accept'])) {
dispatch(new InboxValidator($username, $headers, $payload))->onQueue('follow');
} else {
$lockKey = 'pf:ap:user-inbox:activity:' . hash('sha256', $obj['id']);
if(Cache::get($lockKey) !== null) {
return;
}
Cache::put($lockKey, 1, 43200);
usleep(5000);
dispatch(new InboxValidator($username, $headers, $payload))->onQueue('high');
}
return;