Skip to content

Commit

Permalink
feat: handle metadata key in @fal.function (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
chamini2 authored Jan 9, 2024
1 parent 7f08a90 commit d943e76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions projects/fal/src/fal/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ def function(
exposed_port: int | None = None,
max_concurrency: int | None = None,
# FalServerlessHost options
metadata: dict[str, Any] | None = None,
machine_type: str = FAL_SERVERLESS_DEFAULT_MACHINE_TYPE,
keep_alive: int = FAL_SERVERLESS_DEFAULT_KEEP_ALIVE,
max_multiplexing: int = FAL_SERVERLESS_DEFAULT_MAX_MULTIPLEXING,
Expand All @@ -576,6 +577,7 @@ def function(
exposed_port: int | None = None,
max_concurrency: int | None = None,
# FalServerlessHost options
metadata: dict[str, Any] | None = None,
machine_type: str = FAL_SERVERLESS_DEFAULT_MACHINE_TYPE,
keep_alive: int = FAL_SERVERLESS_DEFAULT_KEEP_ALIVE,
max_multiplexing: int = FAL_SERVERLESS_DEFAULT_MAX_MULTIPLEXING,
Expand Down Expand Up @@ -652,6 +654,7 @@ def function(
exposed_port: int | None = None,
max_concurrency: int | None = None,
# FalServerlessHost options
metadata: dict[str, Any] | None = None,
machine_type: str = FAL_SERVERLESS_DEFAULT_MACHINE_TYPE,
keep_alive: int = FAL_SERVERLESS_DEFAULT_KEEP_ALIVE,
max_multiplexing: int = FAL_SERVERLESS_DEFAULT_MAX_MULTIPLEXING,
Expand Down Expand Up @@ -681,6 +684,7 @@ def function(
exposed_port: int | None = None,
max_concurrency: int | None = None,
# FalServerlessHost options
metadata: dict[str, Any] | None = None,
machine_type: str = FAL_SERVERLESS_DEFAULT_MACHINE_TYPE,
keep_alive: int = FAL_SERVERLESS_DEFAULT_KEEP_ALIVE,
max_multiplexing: int = FAL_SERVERLESS_DEFAULT_MAX_MULTIPLEXING,
Expand Down
2 changes: 1 addition & 1 deletion projects/fal/src/fal/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def register_application(
options=isolated_function.options,
application_name=alias,
application_auth_mode=auth_mode,
metadata={},
metadata=isolated_function.options.host.get("metadata", {}),
)

if id:
Expand Down

0 comments on commit d943e76

Please sign in to comment.