Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
Vincent Pelletier
neoppod
Commits
7de9f20c
Commit
7de9f20c
authored
Feb 29, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factorise master ShutdownHandler.
parent
ab3a7d29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
neo/master/handlers/shutdown.py
neo/master/handlers/shutdown.py
+6
-14
No files found.
neo/master/handlers/shutdown.py
View file @
7de9f20c
...
@@ -19,20 +19,12 @@ import neo.lib
...
@@ -19,20 +19,12 @@ import neo.lib
from
neo.lib
import
protocol
from
neo.lib
import
protocol
from
.
import
BaseServiceHandler
from
.
import
BaseServiceHandler
def
reject
(
*
args
,
**
kw
):
raise
protocol
.
ProtocolError
(
'cluster is shutting down'
)
class
ShutdownHandler
(
BaseServiceHandler
):
class
ShutdownHandler
(
BaseServiceHandler
):
"""This class deals with events for a shutting down phase."""
"""This class deals with events for a shutting down phase."""
def
requestIdentification
(
self
,
conn
,
node_type
,
requestIdentification
=
reject
uuid
,
address
,
name
):
askPrimary
=
reject
neo
.
lib
.
logging
.
error
(
'reject any new connection'
)
askBeginTransaction
=
reject
raise
protocol
.
ProtocolError
(
'cluster is shutting down'
)
def
askPrimary
(
self
,
conn
):
neo
.
lib
.
logging
.
error
(
'reject any new demand for primary master'
)
raise
protocol
.
ProtocolError
(
'cluster is shutting down'
)
def
askBeginTransaction
(
self
,
conn
,
tid
):
neo
.
lib
.
logging
.
error
(
'reject any new demand for new tid'
)
raise
protocol
.
ProtocolError
(
'cluster is shutting down'
)
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