Skip to content

Commit 03310cb

Browse files
committed
better logging
1 parent f529c70 commit 03310cb

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

services/usage-stats/src/insert.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
# Ensure it uses asyncpg
1313
if raw_url.startswith("postgresql://"):
1414
raw_url = raw_url.replace("postgresql://", "postgresql+asyncpg://", 1)
15-
elif not raw_url.startswith("postgresql+asyncpg://"):
15+
else:
1616
raise ValueError(
1717
"Invalid DATABASE_URL: must start with postgresql:// or postgresql+asyncpg://"
1818
)
19-
19+
2020
DATABASE_URL = raw_url
2121

2222
engine = create_async_engine(DATABASE_URL, echo=True)

services/usage-stats/src/last_id.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Ensure it uses asyncpg
1313
if raw_url.startswith("postgresql://"):
1414
raw_url = raw_url.replace("postgresql://", "postgresql+asyncpg://", 1)
15-
elif not raw_url.startswith("postgresql+asyncpg://"):
15+
else:
1616
raise ValueError(
1717
"Invalid DATABASE_URL: must start with postgresql:// or postgresql+asyncpg://"
1818
)

services/usage-stats/src/macrostrat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Ensure the URL uses asyncmy driver
1515
if raw_url.startswith("mysql://"):
1616
raw_url = raw_url.replace("mysql://", "mysql+asyncmy://", 1)
17-
elif not raw_url.startswith("mysql+asyncmy://"):
17+
else:
1818
raise ValueError(
1919
"Invalid DATABASE_URL: must start with mysql:// or mysql+asyncmy://"
2020
)

services/usage-stats/src/rockd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# Ensure the URL uses asyncmy driver
1616
if raw_url.startswith("mysql://"):
1717
raw_url = raw_url.replace("mysql://", "mysql+asyncmy://", 1)
18-
elif not raw_url.startswith("mysql+asyncmy://"):
18+
else:
1919
raise ValueError(
2020
"Invalid DATABASE_URL: must start with mysql:// or mysql+asyncmy://"
2121
)

0 commit comments

Comments
 (0)