Ensure counts are synchronized if the last update is older than max_age seconds
(max_age=SYNC_BACKGROUND_INTERVAL)
| 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}) |
no test coverage detected