Buckets:
| import pytest | |
| def file_db(tmp_path, monkeypatch): | |
| """The real file database: WAL mode, both engines and their hooks, in ``tmp_path``.""" | |
| from app.database import db as db_module | |
| db_path = str(tmp_path / "comfyui.db") | |
| monkeypatch.setattr(db_module.args, "database_url", f"sqlite:///{db_path}") | |
| monkeypatch.setattr(db_module, "Session", None) | |
| monkeypatch.setattr(db_module, "WriteSession", None) | |
| monkeypatch.setattr(db_module, "_db_lock", None) | |
| db_module._init_file_db(db_module.args.database_url) | |
| yield db_path | |
| db_module.Session.kw["bind"].dispose() | |
| db_module.WriteSession.kw["bind"].dispose() | |
| db_module._db_lock.release(force=True) | |
Xet Storage Details
- Size:
- 699 Bytes
- Xet hash:
- 3a1b32269322093adce5e7ac24cd768af89499dfd47b6140c748dad7acd1028b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.