chore: clean

This commit is contained in:
devthejo 2025-06-28 07:33:07 +02:00
parent 16332cbb76
commit 7a816c867e

View file

@ -224,7 +224,6 @@ const HeadlessTask = async (event) => {
}); });
// Change pace to ensure location updates with timeout // Change pace to ensure location updates with timeout
const paceStartTime = Date.now();
await Promise.race([ await Promise.race([
BackgroundGeolocation.changePace(true), BackgroundGeolocation.changePace(true),
new Promise((_, reject) => new Promise((_, reject) =>
@ -234,24 +233,20 @@ const HeadlessTask = async (event) => {
), ),
), ),
]); ]);
const paceDuration = Date.now() - paceStartTime;
Sentry.addBreadcrumb({ Sentry.addBreadcrumb({
message: "changePace completed", message: "changePace completed",
category: "headless-task", category: "headless-task",
level: "info", level: "info",
data: { duration: paceDuration },
}); });
// Perform sync with timeout // Perform sync with timeout
const syncStartTime = Date.now();
const syncResult = await Promise.race([ const syncResult = await Promise.race([
BackgroundGeolocation.sync(), BackgroundGeolocation.sync(),
new Promise((_, reject) => new Promise((_, reject) =>
setTimeout(() => reject(new Error("sync timeout")), 20000), setTimeout(() => reject(new Error("sync timeout")), 20000),
), ),
]); ]);
const syncDuration = Date.now() - syncStartTime;
Sentry.addBreadcrumb({ Sentry.addBreadcrumb({
message: "Sync completed successfully", message: "Sync completed successfully",