Download scripts/check_backup.py from Leon4gr45/openweb: direct link, hf CLI and curl.
- Browser
- Download file 542 Bytes
-
https://huggingface.co/spaces/Leon4gr45/openweb/resolve/main/scripts/check_backup.py
- Command line
-
hf download hf://spaces/Leon4gr45/openweb/scripts/check_backup.py
-
curl -L -o check_backup.py https://huggingface.co/spaces/Leon4gr45/openweb/resolve/main/scripts/check_backup.py
542 Bytes
| """Independent monitor. Nonzero when last success is absent, late or unverified.""" | |
| import argparse,json,sys | |
| from pathlib import Path | |
| sys.path.insert(0,str(Path(__file__).resolve().parent.parent)) | |
| from vrag.backup import stale_status | |
| p=argparse.ArgumentParser();p.add_argument('report',type=Path) | |
| if __name__=='__main__': | |
| args=p.parse_args();report=json.loads(args.report.read_text()) if args.report.exists() else {} | |
| status=stale_status(report);print(json.dumps(status));sys.exit(1 if status['stale'] or not status['enabled'] else 0) | |