1 Commits

Author SHA1 Message Date
lash
c2f55f073e Add missing lock file 2022-05-02 20:12:15 +00:00
4 changed files with 7 additions and 12 deletions

View File

@@ -90,19 +90,12 @@ class ChaindFsAdapter(ChaindAdapter):
def succeed(self, block, tx): def succeed(self, block, tx):
if self.store.is_reserved(tx.hash): if self.store.is_reserved(tx.hash):
raise QueueLockError(tx.hash) raise QueueLockError(tx.hash)
r = self.store.final(tx.hash, block, tx, error=False)
(k, v) = self.store.get(tx.hash) return self.store.final(tx.hash, block, tx, error=False)
self.store.purge(k)
return r
def fail(self, block, tx): def fail(self, block, tx):
if self.store.is_reserved(tx.hash): return self.store.final(tx.hash, block, tx, error=True)
raise QueueLockError(tx.hash)
r = self.store.final(tx.hash, block, tx, error=True)
(k, v) = self.store.get(tx.hash)
self.store.purge(k)
return r
def sendfail(self): def sendfail(self):

View File

@@ -29,6 +29,8 @@ class MockDispatcher:
def send(self, v): def send(self, v):
import sys
sys.stderr.write('susu v {} {}\n'.format(v, self.fails))
if v in self.fails: if v in self.fails:
raise RPCException('{} is in fails'.format(v)) raise RPCException('{} is in fails'.format(v))
pass pass

View File

@@ -1,5 +1,5 @@
chainlib~=0.1.1 chainlib~=0.1.1
chainqueue~=0.1.9 chainqueue~=0.1.8
chainsyncer~=0.4.3 chainsyncer~=0.4.3
confini~=0.6.0 confini~=0.6.0
funga~=0.5.2 funga~=0.5.2

View File

@@ -1,6 +1,6 @@
[metadata] [metadata]
name = chaind name = chaind
version = 0.2.3 version = 0.2.2
description = Base package for chain queue service description = Base package for chain queue service
author = Louis Holbrook author = Louis Holbrook
author_email = dev@holbrook.no author_email = dev@holbrook.no