Skip to content

Commit

Permalink
[dagit] Lower factory floor timeline fidelity to seconds from ms (#7091)
Browse files Browse the repository at this point in the history
  • Loading branch information
benpankow committed Mar 16, 2022
1 parent 17313fe commit f32802e
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,13 @@ const RunTimelineSection = ({jobs, loading}: {jobs: JobItem[]; loading: boolean}
}
}, [loading]);

const now = nowRef.current;
const nowSecs = Math.floor(nowRef.current / 1000);
const range: [number, number] = React.useMemo(() => {
return [now - Number(hourWindow) * ONE_HOUR, now + LOOKAHEAD_HOURS * ONE_HOUR];
}, [hourWindow, now]);
return [
nowSecs * 1000 - Number(hourWindow) * ONE_HOUR,
nowSecs * 1000 + LOOKAHEAD_HOURS * ONE_HOUR,
];
}, [hourWindow, nowSecs]);

const [start, end] = React.useMemo(() => {
const [unvalidatedStart, unvalidatedEnd] = range;
Expand Down

0 comments on commit f32802e

Please sign in to comment.