Perform system update using git pull
()
| 9846 | |
| 9847 | |
| 9848 | def _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 | |
| 9857 | def 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 | |
| 9869 | def _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 | |
| 9877 | def _get_active_ethernet_name(): |
nothing calls this directly
no test coverage detected