1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 06:51:10 +03:00

advance ready counter by an entire batch when event limit is reached

This commit is contained in:
Jake McDermott 2018-08-29 03:03:24 -04:00
parent 4e45b6ba6d
commit f639e46718
No known key found for this signature in database
GPG Key ID: 9A6F084352C3A0B7
2 changed files with 4 additions and 4 deletions

View File

@ -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';

View File

@ -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;
}