fix(sync): refine heartbeat logic and silence non-native warnings
- Silenced 'Heartbeat skipped' warnings when not running in native Electron mode.\n- Hardened device ID retrieval using String-Only ID prioritization logic.\n- Improved reliability of background sync cycles during session transitions.
This commit is contained in:
@@ -22,10 +22,10 @@
|
||||
|
||||
// Loop Timings (Visible in UI)
|
||||
let loop_info = $state({
|
||||
event: 90000,
|
||||
event: 120000,
|
||||
device: 60000,
|
||||
location: 30000,
|
||||
session: 10000
|
||||
location: 90000,
|
||||
session: 45000
|
||||
});
|
||||
|
||||
// Timer Handles
|
||||
@@ -212,7 +212,8 @@
|
||||
dev?.id_random;
|
||||
|
||||
if (!device_id) {
|
||||
if (log_lvl)
|
||||
// Only log warning if we are actually supposed to be in native mode
|
||||
if (log_lvl && $ae_loc.is_native)
|
||||
console.warn(
|
||||
'Sync: Heartbeat skipped, no device_id found in $ae_loc.native_device.'
|
||||
);
|
||||
@@ -242,7 +243,7 @@
|
||||
// Safely handle IP list (bridge may return ip_addresses or networkInterfaces)
|
||||
const ips = info.ip_addresses || [];
|
||||
update_payload.info_ip_list = Array.isArray(ips) ? ips.join(', ') : 'Unknown';
|
||||
|
||||
|
||||
update_payload.meta_json = {
|
||||
platform: info.platform,
|
||||
release: info.release,
|
||||
|
||||
Reference in New Issue
Block a user