forked from mtusi2026/mtusi2026lab3
17 lines
257 B
Python
17 lines
257 B
Python
"""Run schema changes once before starting API replicas."""
|
|
|
|
from app.main import migrate, pool
|
|
|
|
|
|
def main():
|
|
pool.open()
|
|
try:
|
|
pool.wait(timeout=20)
|
|
migrate()
|
|
finally:
|
|
pool.close()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|