mirror of
https://github.com/ansible/awx.git
synced 2024-10-30 22:21:13 +03:00
advance ready counter by an entire batch when event limit is reached
This commit is contained in:
parent
4e45b6ba6d
commit
f639e46718
@ -16,7 +16,7 @@ export const JOB_STATUS_FINISHED = JOB_STATUS_COMPLETE.concat(JOB_STATUS_INCOMPL
|
||||
export const OUTPUT_ELEMENT_CONTAINER = '.at-Stdout-container';
|
||||
export const OUTPUT_ELEMENT_TBODY = '#atStdoutResultTable';
|
||||
export const OUTPUT_ELEMENT_LAST = '#atStdoutMenuLast';
|
||||
export const OUTPUT_MAX_BUFFER_LENGTH = 500;
|
||||
export const OUTPUT_MAX_BUFFER_LENGTH = 1000;
|
||||
export const OUTPUT_MAX_LAG = 120;
|
||||
export const OUTPUT_NO_COUNT_JOB_TYPES = ['ad_hoc_command', 'system_job', 'inventory_update'];
|
||||
export const OUTPUT_ORDER_BY = 'counter';
|
||||
|
@ -4,6 +4,7 @@ import {
|
||||
OUTPUT_MAX_BUFFER_LENGTH,
|
||||
OUTPUT_MAX_LAG,
|
||||
OUTPUT_PAGE_SIZE,
|
||||
OUTPUT_EVENT_LIMIT,
|
||||
} from './constants';
|
||||
|
||||
const rx = [];
|
||||
@ -42,7 +43,7 @@ function OutputStream ($q) {
|
||||
this.lag = 0;
|
||||
this.chain = $q.resolve();
|
||||
|
||||
this.factors = this.calcFactors(OUTPUT_PAGE_SIZE);
|
||||
this.factors = this.calcFactors(OUTPUT_EVENT_LIMIT);
|
||||
this.setFramesPerRender();
|
||||
};
|
||||
|
||||
@ -105,8 +106,7 @@ function OutputStream ($q) {
|
||||
if (missing.length === 0) {
|
||||
ready = this.counters.max;
|
||||
} else if (this.state.overflow) {
|
||||
const removed = Math.min(missing.length, excess);
|
||||
ready = missing[removed - 1] - 1;
|
||||
ready = this.counters.min + this.framesPerRender;
|
||||
} else {
|
||||
ready = missing[0] - 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user