(
jobKey: string,
payload: { communityId: string; userId: string }
)
| 57 | } |
| 58 | |
| 59 | export async function createMarkAllAsReadJob( |
| 60 | jobKey: string, |
| 61 | payload: { communityId: string; userId: string } |
| 62 | ) { |
| 63 | const worker = await WorkerSingleton.getInstance(); |
| 64 | return await worker.addJob('mark-all-as-read-queue', payload, { |
| 65 | jobKey: `mark-all-as-read-queue:${jobKey}`, |
| 66 | maxAttempts: 1, |
| 67 | jobKeyMode: 'replace', |
| 68 | }); |
| 69 | } |
| 70 | |
| 71 | export async function createNotificationJob( |
| 72 | jobKey: string, |