Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0f8960643
|
||
|
|
ce0f29d982
|
||
|
|
263d4df300
|
||
|
|
029deead75
|
||
|
|
da9fb5925d
|
||
|
|
cbf00281c6
|
||
|
|
01ad409077
|
19
CHANGELOG
19
CHANGELOG
@@ -1,3 +1,22 @@
|
||||
- 0.1.15
|
||||
* Upgrade shep to avoid sync in persist set
|
||||
- 0.1.14
|
||||
* Upgrade shep to handle exception in filestore list
|
||||
- 0.1.13
|
||||
* Remove sync on each get
|
||||
* Upgrade shep to guarantee atomic state lock state
|
||||
- 0.1.12
|
||||
* Raise correct exception from index store exists check
|
||||
- 0.1.11
|
||||
* Allow for sync skip in store instantiation
|
||||
- 0.1.10
|
||||
* Improve logging
|
||||
- 0.1.9
|
||||
* Upgrade deps
|
||||
- 0.1.8
|
||||
* Upgrade deps
|
||||
- 0.1.7
|
||||
* Improve logging
|
||||
- 0.1.6
|
||||
* Sort upcoming queue item chronologically
|
||||
* Add unit testing for upcoming query method
|
||||
|
||||
@@ -83,7 +83,6 @@ class Store:
|
||||
s = self.index_store.get(k)
|
||||
err = None
|
||||
try:
|
||||
self.state_store.sync()
|
||||
v = self.state_store.get(s)
|
||||
except FileNotFoundError as e:
|
||||
err = e
|
||||
|
||||
@@ -6,7 +6,10 @@ import logging
|
||||
from leveldir.hex import HexDir
|
||||
|
||||
# local imports
|
||||
from chainqueue.error import DuplicateTxError
|
||||
from chainqueue.error import (
|
||||
DuplicateTxError,
|
||||
NotLocalTxError,
|
||||
)
|
||||
|
||||
logg = logging.getLogger(__name__)
|
||||
|
||||
@@ -22,7 +25,7 @@ class IndexStore(HexDir):
|
||||
existing = None
|
||||
try:
|
||||
existing = self.get(k)
|
||||
except FileNotFoundError:
|
||||
except NotLocalTxError:
|
||||
pass
|
||||
return existing != None
|
||||
|
||||
@@ -37,7 +40,14 @@ class IndexStore(HexDir):
|
||||
|
||||
def get(self, k):
|
||||
fp = self.store.to_filepath(k)
|
||||
f = open(fp, 'rb')
|
||||
f = None
|
||||
err = None
|
||||
try:
|
||||
f = open(fp, 'rb')
|
||||
except FileNotFoundError as e:
|
||||
err = e
|
||||
if err != None:
|
||||
raise NotLocalTxError(err)
|
||||
v = f.read()
|
||||
f.close()
|
||||
return v.decode('utf-8')
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#pysha3==1.0.2
|
||||
hexathon~=0.1.5
|
||||
hexathon~=0.1.6
|
||||
leveldir~=0.3.0
|
||||
#alembic==1.4.2
|
||||
#SQLAlchemy==1.3.20
|
||||
confini~=0.6.0
|
||||
#pyxdg~=0.27
|
||||
chainlib~=0.1.1
|
||||
shep~=0.2.5
|
||||
shep~=0.2.8
|
||||
|
||||
Reference in New Issue
Block a user