File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
x-pack/plugins/ingest_manager/server/services/agents/checkin Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -53,11 +53,15 @@ function getInternalUserSOClient() {
5353}
5454
5555function createNewActionsSharedObservable ( ) : Observable < AgentAction [ ] > {
56- const internalSOClient = getInternalUserSOClient ( ) ;
56+ let lastTimestamp = new Date ( ) . toISOString ( ) ;
5757
5858 return timer ( 0 , AGENT_UPDATE_ACTIONS_INTERVAL_MS ) . pipe (
5959 switchMap ( ( ) => {
60- return from ( getNewActionsSince ( internalSOClient , new Date ( ) . toISOString ( ) ) ) ;
60+ const internalSOClient = getInternalUserSOClient ( ) ;
61+
62+ const timestamp = lastTimestamp ;
63+ lastTimestamp = new Date ( ) . toISOString ( ) ;
64+ return from ( getNewActionsSince ( internalSOClient , timestamp ) ) ;
6165 } ) ,
6266 shareReplay ( { refCount : true , bufferSize : 1 } )
6367 ) ;
You can’t perform that action at this time.
0 commit comments