Skip to content

Commit

Permalink
Refactor poll interval into a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
sabarasaba committed Aug 26, 2021
1 parent aebbdcf commit 4c3377d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions x-pack/plugins/upgrade_assistant/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ export const DEPRECATION_WARNING_UPPER_LIMIT = 999999;
export const DEPRECATION_LOGS_SOURCE_ID = 'deprecation_logs';
export const DEPRECATION_LOGS_INDEX = '.logs-deprecation.elasticsearch-default';
export const DEPRECATION_LOGS_INDEX_PATTERN = '.logs-deprecation.elasticsearch-default';

export const DEPRECATION_LOGS_COUNT_POLL_INTERVAL_MS = 60000;
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { HttpSetup } from 'src/core/public';
import { ESUpgradeStatus } from '../../../common/types';
import { API_BASE_PATH } from '../../../common/constants';
import { API_BASE_PATH, DEPRECATION_LOGS_COUNT_POLL_INTERVAL_MS } from '../../../common/constants';
import {
UseRequestConfig,
SendRequestConfig,
Expand Down Expand Up @@ -89,7 +89,7 @@ export class ApiService {
path: `${API_BASE_PATH}/deprecation_logging/count`,
method: 'get',
query: { from },
pollIntervalMs: 60000,
pollIntervalMs: DEPRECATION_LOGS_COUNT_POLL_INTERVAL_MS,
});
}

Expand Down

0 comments on commit 4c3377d

Please sign in to comment.