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

Function perform_update

webapp_modern.py:9848–9874  ·  view source on GitHub ↗

Perform system update using git pull

()

Source from the content-addressed store, hash-verified

9846
9847
9848def _build_release_gate_payload():
9849 enabled = safe_bool(shared_data.config.get('release_gate_enabled', False))
9850 message = shared_data.config.get('release_gate_message') or RELEASE_GATE_DEFAULT_MESSAGE
9851 return {
9852 'enabled': enabled,
9853 'message': safe_str(message or RELEASE_GATE_DEFAULT_MESSAGE)
9854 }
9855
9856
9857def ensure_recent_sync(max_age=SYNC_BACKGROUND_INTERVAL):
9858 """Ensure counts are synchronized if the last update is older than max_age seconds"""
9859 global last_sync_time
9860
9861 if time.time() - last_sync_time > max_age:
9862 logger.debug("Triggering on-demand sync_all_counts() due to stale data")
9863 sync_all_counts()
9864
9865
9866_wifi_ssid_cache = {'ssid': None, 'timestamp': 0}
9867_WIFI_SSID_CACHE_TTL = 60
9868
9869def _get_active_ethernet_ip():
9870 """Get the IP of the active ethernet interface, or empty string."""
9871 try:
9872 iface = get_active_ethernet_interface()
9873 return iface.get('ip_address', '') if iface else ''
9874 except Exception:
9875 return ''
9876
9877def _get_active_ethernet_name():

Callers

nothing calls this directly

Calls 4

_execute_git_updateFunction · 0.85
infoMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected