lab3: Compose+Nginx, две API-реплики и идемпотентность
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
from messenger.db import apply_migrations, close_engine, init_engine
|
||||
|
||||
|
||||
def main() -> None:
|
||||
init_engine()
|
||||
try:
|
||||
apply_migrations()
|
||||
print("migrations applied")
|
||||
finally:
|
||||
close_engine()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user