Browse Source

Allow skipping the database need.

develop
Olivier 'reivilibre' 3 months ago
parent
commit
c692e0acd2
  1. 6
      scone/default/recipes/postgres.py

6
scone/default/recipes/postgres.py

@ -147,10 +147,14 @@ class PostgresCommands(Recipe):
self.database = check_type(args.get("database"), str)
self.commands = check_type(args.get("commands"), list)
self.skip_database_need = check_type(
args.get("skip_database_need", False), bool
)
def prepare(self, preparation: Preparation, head: Head) -> None:
super().prepare(preparation, head)
preparation.needs("postgres-database", self.database)
if not self.skip_database_need:
preparation.needs("postgres-database", self.database)
async def cook(self, kitchen: Kitchen) -> None:
ch = await kitchen.start(PostgresTransaction(self.database))

Loading…
Cancel
Save