Files
Verstack Local 841a95c56a Complete native workbench, imports, signatures, and catalog management
Save the tested release workflows, RAM media processing, program discovery, FLIRT library, and shared-object maintenance. Add Git exclusions, file attributes, and instructions for a later push using a forwarded SSH agent.
2026-09-13 16:38:57 -05:00

18 lines
611 B
Python

"""Optional measured progress, atomically published to the run's RAM workspace."""
import json
import os
import pathlib
import time
_last = 0.0
def report(stage, completed=None, total=None, unit='items', detail='', force=False):
global _last
path=os.environ.get('VERSTACK_PROGRESS_FILE')
now=time.monotonic()
if not path or (not force and now-_last<.2):return
_last=now
target=pathlib.Path(path)
temporary=target.with_suffix('.next')
temporary.write_text(json.dumps({'stage':stage,'completed':completed,'total':total,'unit':unit,'detail':detail}))
temporary.replace(target)