-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunction_app.py
More file actions
31 lines (24 loc) · 905 Bytes
/
function_app.py
File metadata and controls
31 lines (24 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Copyright (c) 2025 The Regents of the University of California
# SPDX-License-Identifier: BSD-3-Clause
import azure.functions as func
from functions import (
get_dependent_workloads,
get_filters,
get_resources_by_batch,
list_all_resources,
search_resources,
)
from shared.azure_search_client import get_search_client
from shared.database import initialize_database
# Initialize the function app
app = func.FunctionApp()
# Initialize database connection
db, collection = initialize_database()
# Initialize Azure Search client
search_client = get_search_client()
# Register functions
get_resources_by_batch.register_function(app, collection)
search_resources.register_function(app, search_client)
get_filters.register_function(app, collection, db["filter_values"])
get_dependent_workloads.register_function(app, collection)
list_all_resources.register_function(app, collection)