Skip to content

Commit

Permalink
Merge branch 'main' into Matvey-Kuk/small-screen-tiny-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Matvey-Kuk authored Sep 29, 2024
2 parents 9b30ea2 + ab4b44a commit 15c5154
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions keep/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
CONSUMER = os.environ.get("CONSUMER", "true") == "true"

AUTH_TYPE = os.environ.get("AUTH_TYPE", AuthenticationType.NO_AUTH.value)
PROVISION_RESOURCES = os.environ.get("PROVISION_RESOURCES", "true") == "true"
try:
KEEP_VERSION = metadata.version("keep")
except Exception:
Expand Down Expand Up @@ -253,12 +254,13 @@ def get_app(
async def on_startup():
logger.info("Loading providers into cache")
ProvidersFactory.get_all_providers()
# provision providers from env. relevant only on single tenant.
logger.info("Provisioning providers and workflows")
ProvidersService.provision_providers_from_env(SINGLE_TENANT_UUID)
logger.info("Providers loaded successfully")
WorkflowStore.provision_workflows_from_directory(SINGLE_TENANT_UUID)
logger.info("Workflows provisioned successfully")
if PROVISION_RESOURCES:
# provision providers from env. relevant only on single tenant.
logger.info("Provisioning providers and workflows")
ProvidersService.provision_providers_from_env(SINGLE_TENANT_UUID)
logger.info("Providers loaded successfully")
WorkflowStore.provision_workflows_from_directory(SINGLE_TENANT_UUID)
logger.info("Workflows provisioned successfully")
# Start the services
logger.info("Starting the services")
# Start the scheduler
Expand Down

0 comments on commit 15c5154

Please sign in to comment.