Merge branch stable-2.9
* stable-2.9 Split mergeability checks by priority Refactor MergeabilityChecker to use a builder pattern Change-Id: Ibf2e6d86158e72728a2bebdd5f285dc15fbb5228
This commit is contained in:
@@ -46,6 +46,7 @@ import com.google.gerrit.server.cache.h2.DefaultCacheFactory;
|
||||
import com.google.gerrit.server.change.ChangeKindCache;
|
||||
import com.google.gerrit.server.change.MergeabilityChecker;
|
||||
import com.google.gerrit.server.change.MergeabilityChecksExecutor;
|
||||
import com.google.gerrit.server.change.MergeabilityChecksExecutor.Priority;
|
||||
import com.google.gerrit.server.change.PatchSetInserter;
|
||||
import com.google.gerrit.server.config.CanonicalWebUrl;
|
||||
import com.google.gerrit.server.config.CanonicalWebUrlProvider;
|
||||
@@ -294,11 +295,20 @@ public class Reindex extends SiteProgram {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
@MergeabilityChecksExecutor
|
||||
@MergeabilityChecksExecutor(Priority.BACKGROUND)
|
||||
public WorkQueue.Executor createMergeabilityChecksExecutor(
|
||||
WorkQueue queues) {
|
||||
return queues.createQueue(1, "MergeabilityChecks");
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
@MergeabilityChecksExecutor(Priority.INTERACTIVE)
|
||||
public WorkQueue.Executor createInteractiveMergeabilityChecksExecutor(
|
||||
@MergeabilityChecksExecutor(Priority.BACKGROUND)
|
||||
WorkQueue.Executor bg) {
|
||||
return bg;
|
||||
}
|
||||
}
|
||||
|
||||
private int indexAll() throws Exception {
|
||||
|
Reference in New Issue
Block a user