CEC-5432: add additional options (#486)

* CEC-5432: add additional options

* fix missing dep
This commit is contained in:
Tristan Timblin
2023-11-29 16:36:18 -08:00
committed by GitHub
parent f4652b5de7
commit 5ad467b116
6 changed files with 256 additions and 40 deletions

View File

@@ -162,6 +162,10 @@ export const FleetProvider = ({ children }) => {
};
const watchFleetVehicles = new Polling(async ({ token }) => {
if (carUpdateIdsRef.current.length === 0) {
return;
}
const result = await updatesApi.getCarUpdateProgress(
carUpdateIdsRef.current.join(","),
token
@@ -217,7 +221,7 @@ export const FleetProvider = ({ children }) => {
return vehicle;
}));
return Promise.resolve();
}, 5000);
}, 2500);
const addFleetVehicles = async (name, vehicles, token) => {
try {
@@ -233,6 +237,7 @@ export const FleetProvider = ({ children }) => {
if (result.error) {
throw new Error(`Add fleet vehicle error. ${result.message}`);
}
console.log(result)
return result;
} finally {
setBusy(false);