parent
c9e2339af9
commit
ebba50882f
2 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ and C-like syntax.
|
|||
The `Dlang`_ lister list origins from its packages manager registry `DUB`_.
|
||||
|
||||
The registry provides an `http api endpoint`_ that helps in getting the packages index
|
||||
with name, url, versions and dates.
|
||||
with name, url, versions and dates.
|
||||
|
||||
As of July 2023 `DUB`_ list 2364 package names.
|
||||
|
||||
|
|
|
@ -93,14 +93,14 @@ class RubyGemsLister(StatelessLister[RubyGemsListerPage]):
|
|||
db_dsn = postgresql.dsn()
|
||||
db_url = postgresql.url().replace(db_dsn["database"], self.DB_NAME)
|
||||
db = psycopg2.connect(**db_dsn)
|
||||
db.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT) # type: ignore
|
||||
db.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT)
|
||||
with db.cursor() as cursor:
|
||||
cursor.execute(f"CREATE DATABASE {self.DB_NAME}")
|
||||
|
||||
db_dsn["database"] = self.DB_NAME
|
||||
|
||||
db = psycopg2.connect(**db_dsn)
|
||||
db.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT) # type: ignore
|
||||
db.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT)
|
||||
with db.cursor() as cursor:
|
||||
cursor.execute("CREATE EXTENSION IF NOT EXISTS hstore")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue