Skip to content

Commit

Permalink
feat(fal): show machine-type and request/startup timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop committed Feb 13, 2025
1 parent ca68db3 commit d08d80b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion projects/fal/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"isolate[build]>=0.15.0,<0.16.0",
"isolate-proto>=0.6.4,<0.7.0",
"isolate-proto>=0.6.6,<0.7.0",
"grpcio==1.64.0",
"dill==0.3.7",
"cloudpickle==3.0.0",
Expand Down
12 changes: 12 additions & 0 deletions projects/fal/src/fal/cli/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ def _apps_table(apps: list[AliasInfo]):
table.add_column("Max Concurrency")
table.add_column("Max Multiplexing")
table.add_column("Keep Alive")
table.add_column("Request Timeout")
table.add_column("Startup Timeout")
table.add_column("Machine Type")
table.add_column("Active Workers")

for app in apps:
Expand All @@ -30,6 +33,9 @@ def _apps_table(apps: list[AliasInfo]):
str(app.max_concurrency),
str(app.max_multiplexing),
str(app.keep_alive),
str(app.request_timeout),
str(app.startup_timeout),
" ".join(app.machine_types),
str(app.active_runners),
)

Expand Down Expand Up @@ -67,6 +73,9 @@ def _app_rev_table(revs: list[ApplicationInfo]):
table.add_column("Max Concurrency")
table.add_column("Max Multiplexing")
table.add_column("Keep Alive")
table.add_column("Request Timeout")
table.add_column("Startup Timeout")
table.add_column("Machine Type")
table.add_column("Active Workers")

for rev in revs:
Expand All @@ -76,6 +85,9 @@ def _app_rev_table(revs: list[ApplicationInfo]):
str(rev.max_concurrency),
str(rev.max_multiplexing),
str(rev.keep_alive),
str(rev.request_timeout),
str(rev.startup_timeout),
" ".join(rev.machine_types),
str(rev.active_runners),
)

Expand Down
12 changes: 12 additions & 0 deletions projects/fal/src/fal/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ class ApplicationInfo:
max_multiplexing: int
active_runners: int
min_concurrency: int
machine_types: list[str]
request_timeout: int
startup_timeout: int


@dataclass
Expand All @@ -208,6 +211,9 @@ class AliasInfo:
max_multiplexing: int
active_runners: int
min_concurrency: int
machine_types: list[str]
request_timeout: int
startup_timeout: int


@dataclass
Expand Down Expand Up @@ -313,6 +319,9 @@ def _from_grpc_application_info(
max_multiplexing=message.max_multiplexing,
active_runners=message.active_runners,
min_concurrency=message.min_concurrency,
machine_types=message.machine_types,
request_timeout=message.request_timeout,
startup_timeout=message.startup_timeout,
)


Expand All @@ -336,6 +345,9 @@ def _from_grpc_alias_info(message: isolate_proto.AliasInfo) -> AliasInfo:
max_multiplexing=message.max_multiplexing,
active_runners=message.active_runners,
min_concurrency=message.min_concurrency,
machine_types=message.machine_types,
request_timeout=message.request_timeout,
startup_timeout=message.startup_timeout,
)


Expand Down

0 comments on commit d08d80b

Please sign in to comment.