Add a separate queue for non-interactive users

A new internal user group, "Non-Interactive Users" is added. members
of this group are not expected to perform interactive operations on
the gerrit web frontend.

However, sometimes such a user may need a separate thread pool in
order to prevent it from grabbing threads from the interactive users.

This change introduces a second thread pool, which separates
operations from the non-interactive users from the interactive ones.
This ensures that the interactive users can keep working when
resources are tight.

Change-Id: I16334dd84ec50e1a6ca894e635c8beea9bd42115
This commit is contained in:
Nico Sallembien
2010-05-18 16:40:10 -07:00
parent 8ef3b69f35
commit fc53f7fd7a
12 changed files with 224 additions and 37 deletions

View File

@@ -59,6 +59,11 @@ public abstract class CurrentUser {
/** Set of changes starred by this user. */
public abstract Set<Change.Id> getStarredChanges();
/** Is the user a non-interactive user? */
public boolean isBatchUser() {
return getEffectiveGroups().contains(authConfig.getBatchUsersGroup());
}
@Deprecated
public final boolean isAdministrator() {
return getEffectiveGroups().contains(authConfig.getAdministratorsGroup());