Commit 53653af0 authored by Jim Fulton's avatar Jim Fulton

Always use remove_committed to remove blob files.

parent 6a133e1b
...@@ -21,10 +21,11 @@ is used to store the data until a commit or abort. ...@@ -21,10 +21,11 @@ is used to store the data until a commit or abort.
# A faster implementation might store trans data in memory until it # A faster implementation might store trans data in memory until it
# reaches a certain size. # reaches a certain size.
from threading import Lock
import os import os
import cPickle import cPickle
import tempfile import tempfile
from threading import Lock import ZODB.blob
class TransactionBuffer: class TransactionBuffer:
...@@ -116,7 +117,7 @@ class TransactionBuffer: ...@@ -116,7 +117,7 @@ class TransactionBuffer:
while self.blobs: while self.blobs:
oid, blobfilename = self.blobs.pop() oid, blobfilename = self.blobs.pop()
if os.path.exists(blobfilename): if os.path.exists(blobfilename):
os.remove(blobfilename) ZODB.blob.remove_committed(blobfilename)
finally: finally:
self.lock.release() self.lock.release()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment