MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / ensure_recent_sync

Function ensure_recent_sync

webapp_modern.py:3859–3865  ·  view source on GitHub ↗

Ensure counts are synchronized if the last update is older than max_age seconds

(max_age=SYNC_BACKGROUND_INTERVAL)

Source from the content-addressed store, hash-verified

3857 """Return the live install/uninstall log and current service state."""
3858 log = ''
3859 try:
3860 with open(SENSING_INSTALL_LOG, 'r') as f:
3861 log = f.read()[-8000:]
3862 except FileNotFoundError:
3863 pass
3864 installed, active = _sensing_unit_state()
3865 with _sensing_install_lock:
3866 installing = _sensing_installing
3867 return jsonify({'success': True, 'log': log, 'installing': installing,
3868 'installed': installed, 'active': active})

Callers 2

handle_connectFunction · 0.85
broadcast_status_updatesFunction · 0.85

Calls 2

sync_all_countsFunction · 0.85
debugMethod · 0.80

Tested by

no test coverage detected