Skip to content

Commit 8c726f2

Browse files
committed
Bring back accidentally deleted file
1 parent 60bb40e commit 8c726f2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { sql } from '@vercel/postgres'
2+
3+
export default async function createBackgroundJob(
4+
type: 'run_lottery' | 'create_person' | 'invite',
5+
args: {},
6+
status: 'pending' | 'completed' | 'failed' = 'pending',
7+
) {
8+
console.log(JSON.stringify(args))
9+
return await sql`INSERT INTO background_job (type, args, status) VALUES (${type}, ${JSON.stringify(args)}, ${status})`
10+
}
11+
12+
export const fetchCache = 'force-no-store'

0 commit comments

Comments
 (0)