Download apps/api/src/__tests__/postgres-store.test.ts from Lazywords/Rl-Auto: direct link, hf CLI and curl.
- Browser
- Download file 463 Bytes
-
https://huggingface.co/spaces/Lazywords/Rl-Auto/resolve/main/apps/api/src/__tests__/postgres-store.test.ts
- Command line
-
hf download hf://spaces/Lazywords/Rl-Auto/apps/api/src/__tests__/postgres-store.test.ts
-
curl -L -o postgres-store.test.ts https://huggingface.co/spaces/Lazywords/Rl-Auto/resolve/main/apps/api/src/__tests__/postgres-store.test.ts
463 Bytes
| import { describe, expect, it } from "vitest"; | |
| import { POSTGRES_TAKE_NEXT_ITEM_SQL } from "../queue/postgres-store.js"; | |
| describe("Postgres queue store", () => { | |
| it("uses row locks with SKIP LOCKED for multi-instance item consumption", () => { | |
| expect(POSTGRES_TAKE_NEXT_ITEM_SQL).toMatch(/FOR UPDATE SKIP LOCKED/i); | |
| expect(POSTGRES_TAKE_NEXT_ITEM_SQL).toMatch(/UPDATE items/i); | |
| expect(POSTGRES_TAKE_NEXT_ITEM_SQL).toMatch(/RETURNING/i); | |
| }); | |
| }); | |