Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion singlestoredb/apps/_python_udfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ async def run_udf_app(
port=app_config.listen_port,
log_level=log_level,
)
_running_server = AwaitableUvicornServer(config)

# Register the functions only if the app is running interactively.
if app_config.running_interactively:
app.register_functions(replace=True)

_running_server = AwaitableUvicornServer(config)
asyncio.create_task(_running_server.serve())
await _running_server.wait_for_startup()

Expand Down
2 changes: 1 addition & 1 deletion singlestoredb/apps/_stdout_supress.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class StdoutSuppressor:
This should not be used for asynchronous or threaded executions.

```py
with Supressor():
with StdoutSupressor():
print("This won't be printed")
```

Expand Down
4 changes: 4 additions & 0 deletions singlestoredb/apps/_uvicorn_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ async def startup(self, sockets: Optional[List[socket.socket]] = None) -> None:

async def wait_for_startup(self) -> None:
await self._startup_future

async def shutdown(self, sockets: Optional[list[socket.socket]] = None) -> None:
if self.started:
await super().shutdown(sockets)