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
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
c32895c6
Commit
c32895c6
authored
Mar 21, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factorise node acceptance logging.
parent
4640bf1d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
neo/master/app.py
neo/master/app.py
+5
-4
No files found.
neo/master/app.py
View file @
c32895c6
...
...
@@ -478,12 +478,12 @@ class Application(object):
# always accept admin nodes
node_ctor
=
self
.
nm
.
createAdmin
handler
=
administration
.
AdministrationHandler
(
self
)
logging
.
info
(
'Accept an admin %s'
,
dump
(
uuid
))
human_readable_node_type
=
'n admin '
elif
node_type
==
NodeTypes
.
MASTER
:
# always put other master in waiting state
node_ctor
=
self
.
nm
.
createMaster
handler
=
secondary
.
SecondaryMasterHandler
(
self
)
logging
.
info
(
'Accept a master %s'
,
dump
(
uuid
))
human_readable_node_type
=
' master '
elif
node_type
==
NodeTypes
.
CLIENT
:
# refuse any client before running
if
self
.
cluster_state
!=
ClusterStates
.
RUNNING
:
...
...
@@ -491,16 +491,17 @@ class Application(object):
raise
NotReadyError
node_ctor
=
self
.
nm
.
createClient
handler
=
client
.
ClientServiceHandler
(
self
)
logging
.
info
(
'Accept a client %s'
,
dump
(
uuid
))
human_readable_node_type
=
' client '
elif
node_type
==
NodeTypes
.
STORAGE
:
node_ctor
=
self
.
nm
.
createStorage
manager
=
self
.
_current_manager
if
manager
is
None
:
manager
=
self
(
uuid
,
state
,
handler
)
=
manager
.
identifyStorageNode
(
uuid
,
node
)
logging
.
info
(
'Accept a storage %s (%s)'
,
dump
(
uuid
),
state
)
human_readable_node_type
=
' storage (%s) '
%
(
state
,
)
else
:
raise
NotImplementedError
(
node_type
)
logging
.
info
(
'Accept a'
+
human_readable_node_type
+
dump
(
uuid
))
return
(
uuid
,
node
,
state
,
handler
,
node_ctor
)
def
onTransactionCommitted
(
self
,
txn
):
...
...
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