Skip to content

Commit

Permalink
[Uptime] Simplify snapshot max to Infinity (#55931) (#56064)
Browse files Browse the repository at this point in the history
Fixes elastic/uptime#119

Rather than relying on a contant for the max number of monitors, it's
easier to just use infinity. This is simpler than making the iterator
more complex with an 'infinite' mode.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
andrewvc and elasticmachine committed Jan 28, 2020
1 parent 617dbab commit 0c5c054
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,4 @@ export const CONTEXT_DEFAULTS = {
cursorDirection: CursorDirection.AFTER,
sortOrder: SortOrder.ASC,
},

/**
* Defines the maximum number of monitors to iterate on
* in a single count session. The intention is to catch as many as possible.
*/
MAX_MONITORS_FOR_SNAPSHOT_COUNT: 1000000,
};
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const elasticsearchMonitorStatesAdapter: UMMonitorStatesAdapter = {
dateRangeEnd,
CONTEXT_DEFAULTS.CURSOR_PAGINATION,
filters && filters !== '' ? JSON.parse(filters) : null,
CONTEXT_DEFAULTS.MAX_MONITORS_FOR_SNAPSHOT_COUNT,
Infinity,
statusFilter
);

Expand Down

0 comments on commit 0c5c054

Please sign in to comment.