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
05e57566
Commit
05e57566
authored
9 months ago
by
Jakub Ziebinski
Browse files
Options
Downloads
Patches
Plain Diff
Get rid of node data update attempt 5 times
parent
a75aff23
No related branches found
No related tags found
2 merge requests
!399
V1.27.5.12 release
,
!367
Implementation of alarm management
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
clive/__private/ui/app.py
+1
-11
1 addition, 11 deletions
clive/__private/ui/app.py
with
1 addition
and
11 deletions
clive/__private/ui/app.py
+
1
−
11
View file @
05e57566
...
...
@@ -177,7 +177,6 @@ class Clive(App[int], ManualReactive):
return
self
.
world
.
profile_data
.
name
==
ProfileData
.
ONBOARDING_PROFILE_NAME
or
settings
.
FORCE_ONBOARDING
self
.
__class__
.
is_launched
=
True
self
.
__amount_of_fails_during_update_node_data
=
0
self
.
console
.
set_window_title
(
"
Clive
"
)
self
.
update_data_from_node
()
...
...
@@ -385,24 +384,15 @@ class Clive(App[int], ManualReactive):
@work
(
name
=
"
node data update worker
"
)
async
def
update_data_from_node
(
self
)
->
None
:
allowed_fails_of_update_node_data
=
5
accounts
=
(
self
.
world
.
profile_data
.
get_tracked_accounts
()
)
# accounts list gonna be empty, but dgpo will be refreshed
wrapper
=
await
self
.
world
.
commands
.
update_node_data
(
accounts
=
accounts
)
if
wrapper
.
error_occurred
:
self
.
__amount_of_fails_during_update_node_data
+=
1
logger
.
warning
(
f
"
Update node data failed
{
self
.
__amount_of_fails_during_update_node_data
}
times:
{
wrapper
.
error
}
"
)
if
self
.
__amount_of_fails_during_update_node_data
>=
allowed_fails_of_update_node_data
:
wrapper
.
raise_if_error_occurred
()
logger
.
warning
(
f
"
Update node data failed:
{
wrapper
.
error
}
"
)
return
self
.
__amount_of_fails_during_update_node_data
=
0
self
.
trigger_profile_data_watchers
()
self
.
trigger_app_state_watchers
()
...
...
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