Skip to content

Commit

Permalink
Merge branch 'staging' into release-1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed Dec 16, 2024
2 parents 4abcd48 + a6452c5 commit 93886bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion packages/tapisui-api/src/utils/apiGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ const apiGenerator = <T extends unknown>(
basePath: string,
jwt: string | null
): T => {
const headers: any = {};
const headers: any = {
'X-Client-Identifier': 'TapisUI',
};
if (jwt) {
headers['X-Tapis-Token'] = jwt;
}
Expand Down
10 changes: 5 additions & 5 deletions src/app/Jobs/JobDetail/JobDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const JobOutputList: React.FC<{ job: Jobs.Job }> = ({ job }) => {
const JobDetail: React.FC<{ jobUuid: string }> = ({ jobUuid }) => {
const [isCanceled, setIsCanceled] = useState(false);
const [showJSON, setShowJSON] = useState(false);
const [refetchInterval, setRefetchInterval] = useState(0);
const [refetchInterval, setRefetchInterval] = useState(5);
const { data, isLoading, error } = Hooks.useDetails(jobUuid, {
refetchInterval: refetchInterval * 1000,
});
Expand All @@ -99,16 +99,16 @@ const JobDetail: React.FC<{ jobUuid: string }> = ({ jobUuid }) => {
}

if (
refetchInterval === 0 &&
refetchInterval === 5 &&
job?.status &&
!jobRunningStatuses.includes(job?.status)
) {
setRefetchInterval(1);
setRefetchInterval(10);
return;
}

if (jobRunningStatuses.includes(job?.status!)) {
setRefetchInterval(refetchInterval * 2);
setRefetchInterval(refetchInterval * 1.5);
}
}, [data]);

Expand Down Expand Up @@ -228,7 +228,7 @@ const JobDetail: React.FC<{ jobUuid: string }> = ({ jobUuid }) => {
{ jobUuid: job?.uuid! },
{
onSuccess: () => {
setRefetchInterval(1);
setRefetchInterval(5);
},
}
);
Expand Down

0 comments on commit 93886bc

Please sign in to comment.