Skip to content

Commit

Permalink
Add defer_updates=True to FunctionCreateRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaskom committed Aug 2, 2024
1 parent 6a27b03 commit dffaffb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modal/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ async def _load(method_bound_function: "_Function", resolver: Resolver, existing
function=function_definition,
# method_bound_function.object_id usually gets set by preload
existing_function_id=existing_object_id or method_bound_function.object_id or "",
defer_updates=True,
)
assert resolver.client.stub is not None # client should be connected when load is called
with FunctionCreationStatus(resolver, full_name) as function_creation_status:
Expand Down Expand Up @@ -834,6 +835,7 @@ async def _load(self: _Function, resolver: Resolver, existing_object_id: Optiona
function=function_definition,
schedule=schedule.proto_message if schedule is not None else None,
existing_function_id=existing_object_id or "",
defer_updates=True,
)
try:
response: api_pb2.FunctionCreateResponse = await retry_transient_errors(
Expand Down

0 comments on commit dffaffb

Please sign in to comment.