Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefane Fermigier
neo
Commits
cfe1b5ca
Commit
cfe1b5ca
authored
Jul 27, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: small optimization when iterating over storage connections
parent
11d83ad9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
neo/client/pool.py
neo/client/pool.py
+5
-3
No files found.
neo/client/pool.py
View file @
cfe1b5ca
...
@@ -93,9 +93,11 @@ class ConnectionPool(object):
...
@@ -93,9 +93,11 @@ class ConnectionPool(object):
if
uuid
in
self
.
connection_dict
:
if
uuid
in
self
.
connection_dict
:
return
CELL_CONNECTED
return
CELL_CONNECTED
failure
=
self
.
node_failure_dict
.
get
(
uuid
)
failure
=
self
.
node_failure_dict
.
get
(
uuid
)
if
failure
is
None
or
failure
<
time
.
time
()
:
if
failure
:
return
CELL_GOOD
if
time
.
time
()
<
failure
:
return
CELL_FAILED
return
CELL_FAILED
self
.
node_failure_dict
.
pop
(
uuid
,
None
)
return
CELL_GOOD
def
getConnForCell
(
self
,
cell
):
def
getConnForCell
(
self
,
cell
):
return
self
.
getConnForNode
(
cell
.
getNode
())
return
self
.
getConnForNode
(
cell
.
getNode
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment