Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_registerSse(timeoutId, onComplete, onError) {
const sseId = sseService.registerHandler(event => {
if (event.job_multibranch_indexing_result === 'SUCCESS') {
this._cleanup(sseId, timeoutId, onComplete, onError);
}
if (event.job_multibranch_indexing_result === 'FAILURE') {
this._cleanup(sseId, timeoutId, onComplete, onError, { message: 'Indexing failed' });
}
});
}
}
_initListeners() {
this._cleanupListeners();
LOGGER.debug('listening for org folder and multibranch indexing events...');
this._sseSubscribeId = sseService.registerHandler(event => this._onSseEvent(event));
this._sseTimeoutId = setTimeout(() => {
this._onSseTimeout();
}, SSE_TIMEOUT_DELAY);
}
_initialize() {
this._sseSubscribeId = sseService.registerHandler(event => this._onSseEvent(event));
this.noCredentialsOption = {
displayName: translate('creation.git.step1.credentials_placeholder'),
};
}
_initListeners() {
this._cleanupListeners();
LOGGER.debug('listening for org folder and multi-branch indexing events...');
this._sseSubscribeId = sseService.registerHandler(event => this._onSseEvent(event));
this._sseTimeoutId = setTimeout(() => {
this._onSseTimeout();
}, SSE_TIMEOUT_DELAY);
}