Skip to content

Commit 3d13876

Browse files
committed
optimize startup
1 parent 4685939 commit 3d13876

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bale/page.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
def build():
13-
@ui.page("/")
13+
@ui.page("/", response_timeout=30)
1414
async def index(client: Client) -> None:
1515
app.add_static_files("/static", "static")
1616
el.load_element_css()

bale/tabs/manage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import asyncio
22
from copy import deepcopy
3-
from nicegui import ui
3+
from nicegui import background_tasks, ui
44
from . import SelectionConfirm, Tab, Task
55
from bale.result import Result
66
from bale import elements as el
@@ -92,8 +92,8 @@ async def display_snapshots(self):
9292
self._spinner.visible = True
9393
self.zfs.invalidate_query()
9494
snapshots = await self.zfs.snapshots
95-
await self.zfs.filesystems
96-
await self.zfs.holds_for_snapshot()
95+
background_tasks.create(self.zfs.filesystems, name="zfs_filesystems")
96+
background_tasks.create(self.zfs.holds_for_snapshot(), name="zfs_holds")
9797
self._grid.options["rowData"] = list(snapshots.data.values())
9898
self._grid.update()
9999
self._spinner.visible = False

0 commit comments

Comments
 (0)