Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Job Queue is not showing in dashboard

default discord avatar
timurkh-devstarklast year
2 1

Here are the part of my config:

jobs: {
    // Basic enablement of job queue feature
    // This will be expanded with specific tasks/workflows later
    tasks: [
      {
        slug: 'ingest-document',
        handler: ingestDocumentHandler,
        label: 'Ingest Authoritative Document',
        inputSchema: [
          {
            name: 'docId',
            type: 'text',
            required: true,
          },
          {
            name: 'pagesRange',
            type: 'text',
            required: false,
          },
        ],
        outputSchema: [
          {
            name: 'success',
            type: 'checkbox',
            required: true,
          },
          {
            name: 'message',
            type: 'text',
            required: false,
          },
        ],
        retries: 2,
        queue: 'default',
      },
    ],
    // Automatically run jobs every minute on the default queue
    autoRun: [
      {
        cron: '* * * * *', // Run every minute
        limit: 10, // Process up to 10 jobs per run
        queue: 'default', // Target the default queue
      },
    ],
  },

Had tried this config in next payloadcms versions: 3.5, 3.15, 3.32.
New types for job queue module are generated, new db tables created, but there are no any collection in the ui. Why?

  • Selected Answer
    default discord avatar
    timurkh-devstarklast year

    Thanks one guy from Discord https://discord.com/channels/967097582721572934/1358755865921982534:


    By default the jobs collection is hidden, you can overwrite it and set hidden to false like this:

    jobs: {
        tasks: [], // your tasks
        jobsCollectionOverrides: ({defaultJobsCollection}) => {
            if(!defaultJobsCollection.admin){
                defaultJobsCollection.admin = {};
            }
            defaultJobsCollection.admin.hidden = false;
            return defaultJobsCollection
        }
    }

    Payloadcms documentation is so poor...

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.