start = performance.now()
if (c.get('caller') !== 'worker') {
return c.json({ error: 'Unauthorized caller' }, 401)
}
const clip = await prisma.videoClip.findFirst({
where: {
status: 'waiting'
},
orderBy: {
createdAt: 'desc'
}
});
let end = performance.now()
console.log(`PERFLOG [JOB NEXT RETRIEVE]: ${c.req.method} ${c.req.url} ${end - start}ms`)
start = performance.now()
if (c.get('caller') !== 'worker') {
return c.json({ error: 'Unauthorized caller' }, 401)
}
const clip = await prisma.videoClip.findFirst({
where: {
status: 'waiting'
},
orderBy: {
createdAt: 'desc'
}
});
let end = performance.now()
console.log(`PERFLOG [JOB NEXT RETRIEVE]: ${c.req.method} ${c.req.url} ${end - start}ms`)