In order to be more compliant with the swh stack and ease the
writing of tests, use the in-memory objstorage for storing contents
in the in-memory storage implementation.
Details
Details
- Reviewers
vlorentz ardumont - Group Reviewers
Reviewers - Commits
- rDSTOC02e8c7623ad2: storage.in_memory: Use in-memory objstorage to store contents
R65:02e8c7623ad2: storage.in_memory: Use in-memory objstorage to store contents
rDSTO02e8c7623ad2: storage.in_memory: Use in-memory objstorage to store contents
Diff Detail
Diff Detail
- Repository
- rDSTO Storage manager
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
Build is green
See https://jenkins.softwareheritage.org/job/DSTO/job/tox/138/ for more details.
Comment Actions
Sorry @vlorentz, I merged that diff before seeing your comments.
It would make more sense to use a config dict here, like the pg storage.
We can still add it when we will have a use case to use a non-memory objstorage
with a in-memory storage.
Instead of continue, put the yield in an else clause (try blocks accept an else close that runs if no exception was raised).
In fact I reused the implementation from storage.py so this should also be changed in it.
swh/storage/in_memory.py | ||
---|---|---|
122–124 | ah yes, that'd be more readable. |