lab3: Nginx, реплики и идемпотентность
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
"""One-shot schema migration entry point; API processes never migrate."""
|
||||
from .config import Config
|
||||
from .db import Database
|
||||
|
||||
|
||||
def main():
|
||||
database = Database(Config.from_env())
|
||||
try:
|
||||
database.open()
|
||||
database.run_migrations()
|
||||
print('PASS: migrations applied')
|
||||
finally:
|
||||
database.close()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user