-
Notifications
You must be signed in to change notification settings - Fork 5
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
Adds cron job handler functions #26
Conversation
…cron-jobs into fix/import-error
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.
i don't see working proof here
import { DiscordRoleUpdatedList, DiscordUserRole, env } from '../types/global.types'; | ||
import { generateDiscordBotJwt } from '../utils/generateJwt'; | ||
|
||
export const updateUserRoles = async (env: env, payload: DiscordUserRole[]): Promise<DiscordRoleUpdatedList> => { |
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.
Why is this being handled as a part of cron job repo? Don't you think this can be done in RDS backend code itself?
Essentially the cron jobs repo should only contain code that contains the scheduler and the task that is invoked.
Maybe I am missing something here.
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.
If a http request takes a long time, server can choose to timeout that request with an error.
- Currently discord allows us to update roles at an average rate of 1/sec. This means our request can be timed out while the RDS backend is updating a large number of roles at this rate.
- Since Cloudflare docs mention that it does not have any hard limits on the duration for which cron job can run, I've moved this here.
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.
Okay, but this repo then no longer remains just "cron-jobs". We might have to find a solution for this.
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.
Maybe create an issue/ RFC that would tackle this?
…eal-Dev-Squad/cron-jobs into feat/progress-updates-services
Date:
11 Dec 2023
Developer Name: @Ajeyakrishna-k
Issue Ticket Number:-
Description:
Is Under Feature Flag
Database changes
Breaking changes (If your feature is breaking/missing something please mention pending tickets)
Is Development Tested?
Add relevant Screenshot below ( e.g test coverage etc. )