Skip to content

Commit eff82dc

Browse files
committed
Do not run DB migratio if --do-not-run
1 parent a98ad0e commit eff82dc

File tree

1 file changed

+8
-7
lines changed
  • src/aleph/vm/orchestrator

1 file changed

+8
-7
lines changed

src/aleph/vm/orchestrator/cli.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -353,13 +353,14 @@ def main():
353353

354354
settings.check()
355355

356-
logger.debug("Initialising the DB...")
357-
# Check and create execution database
358-
engine = metrics.setup_engine()
359-
asyncio.run(metrics.create_tables(engine))
360-
# After creating it run the DB migrations
361-
asyncio.run(run_async_db_migrations())
362-
logger.debug("DB up to date.")
356+
if not args.do_not_run:
357+
logger.debug("Initialising the DB...")
358+
# Check and create execution database
359+
engine = metrics.setup_engine()
360+
asyncio.run(metrics.create_tables(engine))
361+
# After creating it run the DB migrations
362+
asyncio.run(run_async_db_migrations())
363+
logger.debug("DB up to date.")
363364

364365
if args.benchmark > 0:
365366
asyncio.run(benchmark(runs=args.benchmark), debug=args.debug_asyncio)

0 commit comments

Comments
 (0)