Skip to content

Commit

Permalink
Migrate datastore with state sub-database
Browse files Browse the repository at this point in the history
Signed-off-by: pfeairheller <[email protected]>
  • Loading branch information
pfeairheller committed Nov 7, 2023
1 parent f6d76da commit fac253f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/keri/app/cli/commands/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from keri import kering
from keri.app.cli.common import existing
from keri.core import coring
from keri.core import coring, eventing
from keri.core.coring import Serials, Number, Ilks, Tholder
from keri.core.eventing import MaxIntThold, TraitDex, ample
from keri.db import koming, dbing, subing
Expand Down Expand Up @@ -179,7 +179,8 @@ def migrate(tymth, tock=0.0, **opts):
schema=KeyStateRecord,
subkey='stts.')

for kever in hby.kevers.values():
for _, stt in hby.db.states.getItemIter():
kever = eventing.Kever(state=stt, db=hby.db)
ksr = stateFromKever(kever)
states.pin(kever.prefixer.qb64, val=ksr)

Expand Down
6 changes: 3 additions & 3 deletions src/keri/app/cli/kli.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def main():
directing.runController(doers=doers, expire=0.0)

except Exception as ex:
print(f"ERR: {ex}")
return -1
# raise ex
# print(f"ERR: {ex}")
# return -1
raise ex


if __name__ == "__main__":
Expand Down

0 comments on commit fac253f

Please sign in to comment.