EN

@core / jobs

1.1.3 ▾
verifiedMIT
GitHub

Background jobs on Postgres: durable queue, retries with backoff, cron schedules and a serverless cron endpoint

Code9 filesContext~696 tokensscan passed

The exact tree that will be injected, after .genpmignore. Pinned to

src/lib/jobs/adapters/hono.tsread-only · 10f7c8e
// Adaptador Hono: `app.route('/api/cron', cronRoutes())`. El cron del hosting hace POST con `Authorization: Bearer <CRON_SECRET>`.
import { Hono } from 'hono';
import { isAuthorizedCron, runDue } from '../index.ts';

export function cronRoutes(opts: { limit?: number; concurrency?: number } = {}) {
  return new Hono().post('/', async (c) => {
    if (!isAuthorizedCron(c.req.header('authorization'))) return c.json({ error: 'unauthorized' }, 401);
    return c.json(await runDue(opts));
  });
}

Report @core/jobs

Sign in with GitHub to report a package.