fix: flush logs before starting (#1912)

Co-authored-by: Ankit Nayan <ankit@signoz.io>
This commit is contained in:
Palash Gupta 2022-12-26 17:25:55 +05:30 committed by GitHub
parent 3dcb44a758
commit 6f6499c267
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,7 @@ import { getLogs } from 'store/actions/logs/getLogs';
import { getLogsAggregate } from 'store/actions/logs/getLogsAggregate'; import { getLogsAggregate } from 'store/actions/logs/getLogsAggregate';
import { AppState } from 'store/reducers'; import { AppState } from 'store/reducers';
import AppActions from 'types/actions'; import AppActions from 'types/actions';
import { TOGGLE_LIVE_TAIL } from 'types/actions/logs'; import { FLUSH_LOGS, TOGGLE_LIVE_TAIL } from 'types/actions/logs';
import { GlobalReducer } from 'types/reducer/globalTime'; import { GlobalReducer } from 'types/reducer/globalTime';
import { ILogsReducer } from 'types/reducer/logs'; import { ILogsReducer } from 'types/reducer/logs';
@ -69,6 +69,9 @@ function SearchFilter({
type: TOGGLE_LIVE_TAIL, type: TOGGLE_LIVE_TAIL,
payload: 'PAUSED', payload: 'PAUSED',
}); });
dispatch({
type: FLUSH_LOGS,
});
setTimeout( setTimeout(
() => () =>
dispatch({ dispatch({