-
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
Feat: OOO Nickname Update Job #11
Conversation
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.
Please share the design doc for implementing this solution.
I spoke with Ankush regarding this. I didn't know a design doc was required (the mandate came later). The design doc is still in progress. I've informed him that I'll provide once done. |
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.
Generally good work. Minor questions and suggestions.
try { | ||
token = await generateJwt(env); | ||
} catch (err) { | ||
console.log(`Error while generating JWT token: ${err}`); |
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.
Re: console.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.
In the log both console.log
and console.error
appears as a generic log. But I've changed it to console.error
anyway now.
wrangler.toml
Outdated
# binding = "MY_KV_NAMESPACE" | ||
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | ||
kv_namespaces = [ | ||
{ binding = "CRON_JOBS_TIMESTAMPS", id = "a5431887e6c94dc9b3e36c35a07081b9" } |
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.
What's this id?
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.
These are public IDs to identify namespaces bound to a single account.
throw new Error("Error while trying to update users' discord nickname"); | ||
} | ||
|
||
console.log(data); |
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.
!
async scheduled(req: ScheduledController, env: env, ctx: ExecutionContext) { | ||
switch (req.cron) { | ||
case EVERY_4_HOURS: | ||
ctx.waitUntil(ping(env)); |
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.
How does this notify us when backend is down?
Feat: 1119 Update User Discord Nickname During OOO
Closes: Real-Dev-Squad/website-backend#1119
POST /discord-actions/nickname/status
API every 6 hours.Warning⚠️