bull-arena
Advanced tools
Comparing version 4.1.1 to 4.2.0
@@ -69,3 +69,3 @@ { | ||
"repository": "https://github.com/bee-queue/arena.git", | ||
"version": "4.1.1" | ||
"version": "4.2.0" | ||
} |
@@ -259,4 +259,5 @@ $(document).ready(() => { | ||
if (job) { | ||
const {name, data} = JSON.parse(job); | ||
const {name, data, opts} = JSON.parse(job); | ||
window.jsonEditor.set(data); | ||
if (window.jsonEditorOpts) window.jsonEditorOpts.set(opts); | ||
$('input.js-add-job-name').val(name); | ||
@@ -295,3 +296,4 @@ } else { | ||
const data = window.jsonEditor.get(); | ||
const job = JSON.stringify({name, data}); | ||
const opts = window.jsonEditorOpts ? window.jsonEditorOpts.get() : {}; | ||
const job = JSON.stringify({name, data, opts}); | ||
localStorage.setItem('arena:savedJob', job); | ||
@@ -298,0 +300,0 @@ const {queueHost, queueName} = window.arenaInitialPayload; |
@@ -143,4 +143,5 @@ const _ = require('lodash'); | ||
* @param {String} name The name of the Bull job (optional) | ||
* @param {Object} opts The opts to be used within the job | ||
*/ | ||
async set(queue, data, name) { | ||
async set(queue, data, name, opts) { | ||
if (queue.IS_BEE) { | ||
@@ -152,2 +153,3 @@ return queue.createJob(data).save(); | ||
{ | ||
...opts, | ||
removeOnComplete: false, | ||
@@ -154,0 +156,0 @@ removeOnFail: false, |
async function handler(req, res) { | ||
const {queueName, queueHost} = req.params; | ||
const {name, data} = req.body; | ||
const {name, data, opts} = req.body; | ||
@@ -11,3 +11,3 @@ const {Queues} = req.app.locals; | ||
try { | ||
await Queues.set(queue, data, name); | ||
await Queues.set(queue, data, name, opts); | ||
} catch (err) { | ||
@@ -14,0 +14,0 @@ return res.status(500).json({error: err.message}); |
@@ -38,2 +38,3 @@ const QueueHelpers = require('../helpers/queueHelpers'); | ||
queueIsBee: !!queue.IS_BEE, | ||
queueIsBullMQ: !!queue.IS_BULLMQ, | ||
hasFlows: Flows.hasFlows(), | ||
@@ -40,0 +41,0 @@ jobCounts, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2141000
5958