forked from mtusi2026/mtusi2026lab3
Lab3: HAProxy, API replicas, idempotency for grade 4
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
"""One-shot migrations (run once before API replicas)."""
|
||||
import logging
|
||||
|
||||
from app.db import Database
|
||||
|
||||
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
|
||||
logger = logging.getLogger("migrate")
|
||||
|
||||
|
||||
def main() -> None:
|
||||
db = Database()
|
||||
db.open()
|
||||
logger.info("migrations complete")
|
||||
db.close()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user