Spaces:
Running
Running
Download scripts/cache_refresh.py from bevisssssss/driver: direct link, hf CLI and curl.
- Browser
- Download file 539 Bytes
-
https://huggingface.co/spaces/bevisssssss/driver/resolve/main/scripts/cache_refresh.py
- Command line
-
hf download hf://spaces/bevisssssss/driver/scripts/cache_refresh.py
-
curl -L -o cache_refresh.py https://huggingface.co/spaces/bevisssssss/driver/resolve/main/scripts/cache_refresh.py
539 Bytes
| """Manual trigger: refresh MEGA cache to local SQLite.""" | |
| import sys | |
| import os | |
| sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) | |
| from server.db import init_db | |
| from server.services.cache_service import refresh_mega_cache_immediate | |
| def main(): | |
| init_db() | |
| print("Refreshing MEGA cache...") | |
| ok = refresh_mega_cache_immediate() | |
| if ok: | |
| print("MEGA cache refresh completed.") | |
| else: | |
| print("MEGA cache refresh FAILED (check logs).") | |
| sys.exit(1) | |
| if __name__ == "__main__": | |
| main() | |