Something went wrong. Try again.
Where attention appears to go across agent threads: collector, web explorer, and native iOS client
Something went wrong. Try again.
123456789101112131415161718192021from pathlib import Pathimport fcntlimport sysimport time
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))from attention_digest import DIRECTORY, refresh
DIRECTORY.mkdir(parents=True, exist_ok=True, mode=0o700)with (DIRECTORY / 'attention-digest.lock').open('w') as lock: try: fcntl.flock(lock, fcntl.LOCK_EX | fcntl.LOCK_NB) except BlockingIOError: raise SystemExit('Summary worker already running') while True: try: refresh(limit=3) except Exception as error: print('Summary refresh failed: ' + type(error).__name__, flush=True) time.sleep(300)