()
| 62 | })(); |
| 63 | |
| 64 | async function createJobs() { |
| 65 | const accounts = await prisma.accounts.findMany({ |
| 66 | select: { id: true }, |
| 67 | where: { discordServerId: { not: null } }, |
| 68 | orderBy: { createdAt: 'desc' }, |
| 69 | }); |
| 70 | const jobs: any = []; |
| 71 | accounts.map((acc) => |
| 72 | jobs.push(queue.add(() => discordSync({ accountId: acc.id }))) |
| 73 | ); |
| 74 | return jobs; |
| 75 | } |
no test coverage detected