Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P1060
get_storage with instantiated db connection
Active
Public
Actions
Authored by
olasd
on Jun 2 2021, 2:04 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
# try this first
get_storage
(
cls
=
"postgresql"
,
db
=<
psycopg2
connection
instance
>
,
objstorage
=
{
"cls"
:
"memory"
})
# ïf that doesn't work, something like the following should work
swh
.
storage
.
postgresql
.
storage
.
Storage
(
db
=<
psycopg2
connection
instance
>
,
objstorage
=
{
"cls"
:
"memory"
})
Event Timeline
olasd
created this paste.
Jun 2 2021, 2:04 PM
2021-06-02 14:04:50 (UTC+2)
Log In to Comment