mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-11-30 01:16:50 +00:00
Remove use of account lock executor in
ClearOrphanedFoundationDbQueuesCommand
This commit is contained in:
1 parent
b6bed9d772
commit
7bc8b93c18
3 files changed
+3
-3
No files matched your search
@@ -523,7 +523,7 @@ public class AccountsManager extends RedisPubSubAdapter<String, String> implemen
|
||||
accountLockManager.withLock(Set.of(maybeRecentlyDeletedAccountIdentifier.get()), () -> {
|
||||
accounts.create(account, additionalWriteItems);
|
||||
return null;
|
||||
}, accountLockExecutor);
|
||||
});
|
||||
} else {
|
||||
accounts.create(account, additionalWriteItems);
|
||||
}
|
||||
|
||||
+1
-1
@@ -209,7 +209,7 @@ public class ClearOrphanedFoundationDbQueuesCommand extends AbstractCommandWithD
|
||||
}
|
||||
clearQueue(database, aci, transactionRetryLimit, transactionTimeout);
|
||||
return null;
|
||||
}, executor), executor));
|
||||
}), executor));
|
||||
}
|
||||
|
||||
private void clearQueue(final Database database, final AciServiceIdentifier aci, final long transactionRetryLimit,
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ class ClearOrphanedFoundationDbQueuesCommandTest {
|
||||
accountsManager = mock(AccountsManager.class);
|
||||
accountLockManager = mock(AccountLockManager.class);
|
||||
|
||||
when(accountLockManager.withLock(any(), any(), any())).thenAnswer(invocation -> {
|
||||
when(accountLockManager.withLock(any(), any())).thenAnswer(invocation -> {
|
||||
//noinspection rawtypes
|
||||
final ThrowingSupplier supplier = invocation.getArgument(1);
|
||||
return supplier.get();
|
||||
|
||||
Reference in new issue
Block a user