mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-16 02:06:21 +01:00
@@ -108,18 +108,19 @@ const usePing = (app: AppType) => {
|
|||||||
configName: name ?? '',
|
configName: name ?? '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
retry: false,
|
retry: true,
|
||||||
enabled: isActive,
|
enabled: isActive,
|
||||||
refetchOnWindowFocus: false,
|
refetchOnWindowFocus: false,
|
||||||
|
refetchInterval: 1000 * 60,
|
||||||
retryDelay(failureCount, error) {
|
retryDelay(failureCount, error) {
|
||||||
// TODO: Add logic to retry on timeout
|
console.error(`Unable to retry app ping for app '${app.name}' (${app.id})`, error);
|
||||||
return 3000;
|
if (failureCount > 3) {
|
||||||
|
return 60 * 1000;
|
||||||
|
}
|
||||||
|
return 3 * 1000;
|
||||||
},
|
},
|
||||||
// 5 minutes of cache
|
cacheTime: 1000 * 60,
|
||||||
cacheTime: 1000 * 60 * 5,
|
|
||||||
staleTime: 1000 * 60 * 5,
|
|
||||||
retryOnMount: true,
|
retryOnMount: true,
|
||||||
|
|
||||||
select: (data) => {
|
select: (data) => {
|
||||||
const isOk = isStatusOk(app, data.status);
|
const isOk = isStatusOk(app, data.status);
|
||||||
if (isOk)
|
if (isOk)
|
||||||
|
|||||||
Reference in New Issue
Block a user