Skip to content
GitLab
Explore
Sign in
Register
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
60d70f14
Verified
Commit
60d70f14
authored
2 weeks ago
by
Mateusz Żebrak
Browse files
Options
Downloads
Patches
Plain Diff
Fix random crash when locking
#405
parent
54446e1f
No related branches found
No related tags found
2 merge requests
!602
Fix locking issues
,
!600
v1.27.5.21 Release
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
clive/__private/ui/app.py
+15
-1
15 additions, 1 deletion
clive/__private/ui/app.py
with
15 additions
and
1 deletion
clive/__private/ui/app.py
+
15
−
1
View file @
60d70f14
...
@@ -14,7 +14,7 @@ from textual.await_complete import AwaitComplete
...
@@ -14,7 +14,7 @@ from textual.await_complete import AwaitComplete
from
textual.binding
import
Binding
from
textual.binding
import
Binding
from
textual.notifications
import
Notification
,
Notify
,
SeverityLevel
from
textual.notifications
import
Notification
,
Notify
,
SeverityLevel
from
textual.reactive
import
var
from
textual.reactive
import
var
from
textual.worker
import
WorkerCancelled
from
textual.worker
import
NoActiveWorker
,
WorkerCancelled
,
get_current_worker
from
clive.__private.core.async_guard
import
AsyncGuard
from
clive.__private.core.async_guard
import
AsyncGuard
from
clive.__private.core.constants.terminal
import
TERMINAL_HEIGHT
,
TERMINAL_WIDTH
from
clive.__private.core.constants.terminal
import
TERMINAL_HEIGHT
,
TERMINAL_WIDTH
...
@@ -435,6 +435,10 @@ class Clive(App[int]):
...
@@ -435,6 +435,10 @@ class Clive(App[int]):
self
.
pause_refresh_node_data_interval
()
self
.
pause_refresh_node_data_interval
()
self
.
pause_refresh_alarms_data_interval
()
self
.
pause_refresh_alarms_data_interval
()
self
.
pause_refresh_beekeeper_wallet_lock_status_interval
()
self
.
pause_refresh_beekeeper_wallet_lock_status_interval
()
# There might be ongoing workers that should be cancelled (e.g. DynamicWidget update)
self
.
_cancel_workers_except_current
()
self
.
world
.
node
.
cached
.
clear
()
self
.
world
.
node
.
cached
.
clear
()
await
self
.
switch_mode_with_reset
(
"
unlock
"
)
await
self
.
switch_mode_with_reset
(
"
unlock
"
)
await
self
.
world
.
switch_profile
(
None
)
await
self
.
world
.
switch_profile
(
None
)
...
@@ -445,3 +449,13 @@ class Clive(App[int]):
...
@@ -445,3 +449,13 @@ class Clive(App[int]):
self
.
resume_refresh_node_data_interval
()
self
.
resume_refresh_node_data_interval
()
self
.
resume_refresh_alarms_data_interval
()
self
.
resume_refresh_alarms_data_interval
()
self
.
resume_refresh_beekeeper_wallet_lock_status_interval
()
self
.
resume_refresh_beekeeper_wallet_lock_status_interval
()
def
_cancel_workers_except_current
(
self
)
->
None
:
try
:
current_worker
=
get_current_worker
()
except
NoActiveWorker
:
current_worker
=
None
for
worker
in
self
.
workers
:
if
worker
!=
current_worker
:
worker
.
cancel
()
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