Skip to content
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: Add a cron job to hit the filter orphan tasks API every 6hours #65

Merged
merged 4 commits into from
Apr 3, 2024

Conversation

MehulKChaudhari
Copy link
Member

@MehulKChaudhari MehulKChaudhari commented Apr 2, 2024

Date: 2/04/2024

Developer Name: @MehulKChaudhari


Issue Ticket Number

Description

This PR add's cron job which run every 6hours and hits orphan tasks API, That API filters all the tasks from users who are not in discord server and the tasks which are not DONE are marked as BACKLOG

##Warning ⚠️

Please merge this PR after Real-Dev-Squad/website-backend#1996

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

src/handlers/scheduledEventHandler.ts Outdated Show resolved Hide resolved
@lakshayman lakshayman merged commit 9c0499e into develop Apr 3, 2024
1 check passed
@lakshayman lakshayman deleted the feat/cron-job-orphan-tasks branch April 3, 2024 20:17
@MehulKChaudhari MehulKChaudhari mentioned this pull request Apr 3, 2024
10 tasks
Comment on lines +24 to +26
await callDiscordNicknameBatchUpdate(env);
await filterOrphanTasks(env);
console.log('Worker for filtering the orphan tasks has completed');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

await? won't this cause workers to exhaust 30s timelimit

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sir, without await how we can call the async function, I mean yes you are right the case is real where we might be exhausting the 30 time-limit. But I then how to do it without await

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.

5 participants