Skip to content

Conversation

@jaanbaaz
Copy link
Collaborator

No description provided.

@jaanbaaz jaanbaaz requested a review from karntrehan November 14, 2024 07:27
async def on_message(self, message):
pass
# contributor = SupabaseClient().read(
# contributor = PostgresClient().read(
Copy link
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.

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

discordMemberData = SupabaseClient().read(
discordMemberData = PostgresClient().read(
Copy link
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.

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
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.

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
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.

# async def give_badges(self, ctx):
# self.give_discord_badges.start()

@tasks.loop(minutes=10)
Copy link
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
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.

8 participants