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
Levin Zimmermann
neoppod
Commits
c324955d
Commit
c324955d
authored
Jul 03, 2015
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: fix "signal only works in main thread" when adding a ZODB Mount Point to NEO
parent
79fca358
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
neo/client/__init__.py
neo/client/__init__.py
+2
-0
neo/client/app.py
neo/client/app.py
+12
-1
No files found.
neo/client/__init__.py
View file @
c324955d
...
...
@@ -12,6 +12,8 @@
#
##############################################################################
import
app
# set up signal handers early enough to do it in the main thread
if
1
:
from
hashlib
import
md5
from
ZODB.Connection
import
Connection
...
...
neo/client/app.py
View file @
c324955d
...
...
@@ -20,6 +20,7 @@ from neo.lib.locking import Empty
from
random
import
shuffle
import
heapq
import
time
import
weakref
from
functools
import
partial
from
ZODB.POSException
import
UndoError
,
StorageTransactionError
,
ConflictError
...
...
@@ -57,6 +58,16 @@ if SignalHandler:
import
signal
SignalHandler
.
registerHandler
(
signal
.
SIGUSR2
,
logging
.
reopen
)
class
app_set
(
weakref
.
WeakSet
):
def
on_log
(
self
):
for
app
in
self
:
app
.
log
()
app_set
=
app_set
()
registerLiveDebugger
(
app_set
.
on_log
)
class
Application
(
object
):
"""The client node application."""
...
...
@@ -116,7 +127,7 @@ class Application(object):
# node connection attemps
self
.
_connecting_to_master_node
=
Lock
()
self
.
compress
=
compress
registerLiveDebugger
(
on_log
=
self
.
log
)
app_set
.
add
(
self
)
# to register self.on_log
def
__getattr__
(
self
,
attr
):
if
attr
==
'pt'
:
...
...
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