mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-19 20:18:05 +01:00
Refactor ProcessScheduledJobsServiceCommand to dispose of processing jobs on shutdown
This commit is contained in:
@@ -136,7 +136,7 @@ public abstract class JobScheduler {
|
||||
*
|
||||
* @see #processJob(byte[])
|
||||
*/
|
||||
public CompletableFuture<Void> processAvailableJobs() {
|
||||
public Mono<Void> processAvailableJobs() {
|
||||
return Flux.from(dynamoDbAsyncClient.queryPaginator(QueryRequest.builder()
|
||||
.tableName(tableName)
|
||||
.keyConditionExpression("#schedulerName = :schedulerName AND #runAt <= :maxRunAt")
|
||||
@@ -164,8 +164,7 @@ public abstract class JobScheduler {
|
||||
return Mono.empty();
|
||||
});
|
||||
}, MAX_CONCURRENCY)
|
||||
.then()
|
||||
.toFuture();
|
||||
.then();
|
||||
}
|
||||
|
||||
private CompletableFuture<Void> deleteJob(final AttributeValue schedulerName, final AttributeValue runAt) {
|
||||
|
||||
Reference in New Issue
Block a user