| 309 | */ |
| 310 | |
| 311 | const fetchActiveTaskMembers = async () => { |
| 312 | try { |
| 313 | const status = [OLD_ACTIVE, OLD_BLOCKED, OLD_PENDING, IN_PROGRESS, BLOCKED, SMOKE_TESTING]; |
| 314 | const tasksSnapshot = await tasksModel.where("type", "==", TASK_TYPE.FEATURE).where("status", "in", status).get(); |
| 315 | const activeMembers = new Set(); |
| 316 | if (!tasksSnapshot.empty) { |
| 317 | tasksSnapshot.forEach((task) => { |
| 318 | const { assignee } = task.data(); |
| 319 | activeMembers.add(assignee); |
| 320 | }); |
| 321 | } |
| 322 | return activeMembers; |
| 323 | } catch (err) { |
| 324 | logger.error("error getting tasks", err); |
| 325 | throw err; |
| 326 | } |
| 327 | }; |
| 328 | |
| 329 | /** |
| 330 | * Fetch a task |