Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
clive
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
clive
Commits
3ba929a1
Verified
Commit
3ba929a1
authored
4 weeks ago
by
Mateusz Żebrak
Browse files
Options
Downloads
Patches
Plain Diff
Create methods for pausing/resuming all app timers
parent
60d70f14
No related branches found
No related tags found
2 merge requests
!602
Fix locking issues
,
!600
v1.27.5.21 Release
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
clive/__private/ui/app.py
+12
-6
12 additions, 6 deletions
clive/__private/ui/app.py
tests/tui/conftest.py
+1
-3
1 addition, 3 deletions
tests/tui/conftest.py
with
13 additions
and
9 deletions
clive/__private/ui/app.py
+
12
−
6
View file @
3ba929a1
...
...
@@ -263,6 +263,16 @@ class Clive(App[int]):
def
resume_refresh_beekeeper_wallet_lock_status_interval
(
self
)
->
None
:
self
.
_refresh_beekeeper_wallet_lock_status_interval
.
resume
()
def
pause_periodic_intervals
(
self
)
->
None
:
self
.
pause_refresh_node_data_interval
()
self
.
pause_refresh_alarms_data_interval
()
self
.
pause_refresh_beekeeper_wallet_lock_status_interval
()
def
resume_periodic_intervals
(
self
)
->
None
:
self
.
resume_refresh_node_data_interval
()
self
.
resume_refresh_alarms_data_interval
()
self
.
resume_refresh_beekeeper_wallet_lock_status_interval
()
def
trigger_profile_watchers
(
self
)
->
None
:
self
.
world
.
mutate_reactive
(
TUIWorld
.
profile_reactive
)
# type: ignore[arg-type]
...
...
@@ -432,9 +442,7 @@ class Clive(App[int]):
if
source
==
"
beekeeper_wallet_lock_status_update_worker
"
:
self
.
notify
(
"
Switched to the LOCKED mode due to timeout.
"
,
timeout
=
10
)
self
.
pause_refresh_node_data_interval
()
self
.
pause_refresh_alarms_data_interval
()
self
.
pause_refresh_beekeeper_wallet_lock_status_interval
()
self
.
pause_periodic_intervals
()
# There might be ongoing workers that should be cancelled (e.g. DynamicWidget update)
self
.
_cancel_workers_except_current
()
...
...
@@ -446,9 +454,7 @@ class Clive(App[int]):
async
def
_switch_mode_into_unlocked
(
self
)
->
None
:
await
self
.
switch_mode_with_reset
(
"
dashboard
"
)
self
.
update_alarms_data_on_newest_node_data
(
suppress_cancelled_error
=
True
)
self
.
resume_refresh_node_data_interval
()
self
.
resume_refresh_alarms_data_interval
()
self
.
resume_refresh_beekeeper_wallet_lock_status_interval
()
self
.
resume_periodic_intervals
()
def
_cancel_workers_except_current
(
self
)
->
None
:
try
:
...
...
This diff is collapsed.
Click to expand it.
tests/tui/conftest.py
+
1
−
3
View file @
3ba929a1
...
...
@@ -99,9 +99,7 @@ async def prepared_tui_on_dashboard(prepared_env: PreparedTuiEnv) -> PreparedTui
# update the data and resume timers (pilot skips onboarding/unlocking via TUI - updating is handled there)
await
pilot
.
app
.
update_alarms_data_on_newest_node_data
().
wait
()
pilot
.
app
.
resume_refresh_node_data_interval
()
pilot
.
app
.
resume_refresh_alarms_data_interval
()
pilot
.
app
.
resume_refresh_beekeeper_wallet_lock_status_interval
()
pilot
.
app
.
resume_periodic_intervals
()
await
pilot
.
app
.
push_screen
(
Dashboard
())
await
wait_for_screen
(
pilot
,
Dashboard
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment