You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: orphaned tasks API changes.
* feat: Added tests for orphaned tasks.
* chore: Returned without a block for usersnaptop empty and added spacing to make it more readable.
* Refactor: Update fetchOrphanedTasks to use batch query for incomplete tasks
- Replaced individual queries with `fetchIncompleteTasksByUserIds` to fetch tasks in batch for users not in the Discord server.
- Improved performance by reducing the number of database queries.
- Modified testcases based on the updates.
* fix: Changed abandoned tasks to orphaned tasks.
* Fix: Changed the validation type of orphaned to boolean instead of string.
* Fetches users who are not in the Discord server.
1078
+
* @returns {Promise<FirebaseFirestore.QuerySnapshot>} - A promise that resolves to a Firestore QuerySnapshot containing the users matching the criteria.
1079
+
* @throws {Error} - Throws an error if the database query fails.
1080
+
*/
1081
+
constfetchUsersNotInDiscordServer=async()=>{
1082
+
try{
1083
+
constusersNotInDiscordServer=awaituserModel
1084
+
.where("roles.archived","==",true)
1085
+
.where("roles.in_discord","==",false)
1086
+
.get();
1087
+
returnusersNotInDiscordServer;
1088
+
}catch(error){
1089
+
logger.error(`Error in getting users who are not in discord server: ${error}`);
0 commit comments