Skip to content

Commit

Permalink
Added types for queues/logger
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicbachmann committed Apr 6, 2022
1 parent 78e6a7d commit 456b1b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/queues/logger.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { prisma } from '$lib/database';
import { dev } from '$app/env';
import type { Job } from 'bullmq';

export default async function (job) {
export default async function (job: Job): Promise<void> {
const { line, applicationId, buildId } = job.data;
if (dev) console.debug(`[${applicationId}] ${line}`);
await prisma.buildLog.create({ data: { line, buildId, time: Number(job.id), applicationId } });
Expand Down

0 comments on commit 456b1b8

Please sign in to comment.