Skip to content

data without "payload" property #20

@trx222

Description

@trx222

Hi. Is There a way to add the job data without the property "payload" ? This makes it possibly incompatible if you want to use this library together with others that puts data objects ( or pure strings ? ) directly to the job contents.

If I spawn a job with the lib it looks like this:

{
    "payload":{
        "ax":"xyz"
    }
}

but I expect it like this:

{
     "ax":"xyz"
}

Code is from your example:

worker.spawn(tube, {
  ax: "xyz" // job payload/values
}, {
  delay: 0,
  priority: 1000,
  timeout: 10 * 60 * 1000 // ms
}).then(function (job) {
  console.log(job.id);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions