Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
2b9759a9
Commit
2b9759a9
authored
Apr 01, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
27c1870a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
bigfile/_file_zodb.pyx
bigfile/_file_zodb.pyx
+2
-12
lib/tests/test_zodb.py
lib/tests/test_zodb.py
+4
-0
No files found.
bigfile/_file_zodb.pyx
View file @
2b9759a9
...
...
@@ -159,20 +159,10 @@ class ZSync:
# zconn = DB.open(transaction_manager=tm)
# tm.commit() # zconn.at updated (zconn.afterCompletion -> zconn.newTransaction)
# tm.commit() # zconn.at updated again
#
# TODO test for that.
#zconn.onOpenCallback(zsync)
zconn
.
onResyncCallback
(
zsync
)
"""
# DB.open() pops .zconn from connection pool and "opens" for usage.
# -> resync .wconn to new database view of ZODB connection.
#
def on_connection_open(zsync):
print('ZSync.resync %r %r' % (zsync.zconn, zsync.wconn))
zsync.wconn.resync(zconn_at(zsync.zconn))
"""
# DB resyncs .zconn onto new database view.
# -> resync .wconn to updated database view of ZODB connection.
def
on_connection_resync
(
zsync
):
#print('\nZZZSync.resync %r %r' % (zsync.zconn, zsync.wconn))
#import traceback; traceback.print_stack()
...
...
lib/tests/test_zodb.py
View file @
2b9759a9
...
...
@@ -341,6 +341,10 @@ def test_zodb_onresync():
assert
t
.
nresync
==
2
transaction
.
commit
()
assert
t
.
nresync
==
3
transaction
.
commit
()
assert
t
.
nresync
==
4
transaction
.
commit
()
assert
t
.
nresync
==
5
conn
.
close
()
...
...
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