Skip to content

Changes for migration to be postgres to be merged to main - #86

Closed
jaanbaaz wants to merge 37 commits into
mainfrom
dev
Closed

jaanbaaz wants to merge 37 commits into
mainfrom
dev

Conversation

@jaanbaaz

Copy link
Copy Markdown
Collaborator

No description provided.

@jaanbaaz
jaanbaaz requested a review from karntrehan November 14, 2024 07:27
Comment thread cogs/discordDataScraper.py Outdated
async def on_message(self, message):
pass
# contributor = SupabaseClient().read(
# contributor = PostgresClient().read(

Copy link
Copy Markdown
Contributor

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.

Comment thread cogs/badges.py Outdated
userBadges["achievements"].append(self.discordXGithubBadge)

discordMemberData = SupabaseClient().read(
discordMemberData = PostgresClient().read(

Copy link
Copy Markdown
Contributor

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.

Comment thread 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(

Copy link
Copy Markdown
Contributor

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.

Comment thread cogs/listeners/role_events_cog.py Outdated
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")

Copy link
Copy Markdown
Contributor

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.

Comment thread cogs/userInteractions.py Outdated
# async def give_badges(self, ctx):
# self.give_discord_badges.start()

@tasks.loop(minutes=10)

Copy link
Copy Markdown
Contributor

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?

@Shreyash-work-em

Copy link
Copy Markdown
Collaborator

Updated pull request added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants