-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes for migration to be postgres to be merged to main #86
base: main
Are you sure you want to change the base?
Conversation
cogs/discordDataScraper.py
Outdated
@@ -28,12 +28,12 @@ def __init__(self, bot) -> None: | |||
@commands.Cog.listener() | |||
async def on_message(self, message): | |||
pass | |||
# contributor = SupabaseClient().read( | |||
# contributor = PostgresClient().read( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets delete the commented code.
cogs/badges.py
Outdated
@@ -143,7 +143,7 @@ def get_user_badges(self, discord_id): | |||
): | |||
userBadges["achievements"].append(self.discordXGithubBadge) | |||
|
|||
discordMemberData = SupabaseClient().read( | |||
discordMemberData = PostgresClient().read( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we create 1 class level instance of postgresclient please? Creating a new one each time seems unncessary.
cogs/badges.py
Outdated
table="connected_prs", query_key="raised_by", query_value=github_id | ||
), | ||
"merged": SupabaseClient(table="connected_prs").read( | ||
"merged": PostgresClient(table="connected_prs").read( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a different syntax. We should have a uniform syntax across the board.
cogs/listeners/role_events_cog.py
Outdated
@@ -13,27 +13,27 @@ def __init__(self, bot) -> None: | |||
async def on_guild_role_create(self, role: discord.Role): | |||
if role.name.startswith("College:"): | |||
orgName = role.name[len("College: ") :] | |||
SupabaseClient().addChapter(roleId=role.id, orgName=orgName, type="COLLEGE") | |||
PostgresClient().addChapter(roleId=role.id, orgName=orgName, type="COLLEGE") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class level instance here as well. Lets do it for all classes.
cogs/userInteractions.py
Outdated
# async def give_badges(self, ctx): | ||
# self.give_discord_badges.start() | ||
|
||
@tasks.loop(minutes=10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be a duplicate? Merging issue?
Migration to postgres bug fixes
No description provided.