Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
5a4b266b
Commit
5a4b266b
authored
5 years ago
by
Vincent Texier
Browse files
Options
Downloads
Patches
Plain Diff
[enh] increase delay between network crawling to 1 mn
parent
9dba9504
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sakia/services/network.py
+4
-3
4 additions, 3 deletions
src/sakia/services/network.py
with
4 additions
and
3 deletions
src/sakia/services/network.py
+
4
−
3
View file @
5a4b266b
...
@@ -165,9 +165,10 @@ class NetworkService(QObject):
...
@@ -165,9 +165,10 @@ class NetworkService(QObject):
self
.
_must_crawl
=
True
self
.
_must_crawl
=
True
first_loop
=
True
first_loop
=
True
asyncio
.
ensure_future
(
self
.
discovery_loop
())
asyncio
.
ensure_future
(
self
.
discovery_loop
())
self
.
refresh_once
()
await
self
.
refresh_once
()
while
self
.
continue_crawling
():
while
self
.
continue_crawling
():
if
not
first_loop
:
if
not
first_loop
:
self
.
_logger
.
debug
(
"
Start of network crawling...
"
)
for
node
in
self
.
_processor
.
nodes
(
self
.
currency
):
for
node
in
self
.
_processor
.
nodes
(
self
.
currency
):
if
(
if
(
node
.
state
>
Node
.
FAILURE_THRESHOLD
node
.
state
>
Node
.
FAILURE_THRESHOLD
...
@@ -193,9 +194,9 @@ class NetworkService(QObject):
...
@@ -193,9 +194,9 @@ class NetworkService(QObject):
self
.
run_ws2p_check
()
self
.
run_ws2p_check
()
first_loop
=
False
first_loop
=
False
await
asyncio
.
sleep
(
15
)
await
asyncio
.
sleep
(
60
)
self
.
_logger
.
debug
(
"
End of
network discovery
"
)
self
.
_logger
.
debug
(
"
End of
discover_network()
"
)
async
def
discovery_loop
(
self
):
async
def
discovery_loop
(
self
):
"""
"""
...
...
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