1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2026-11-02 08:34:44 +00:00

allow adding job to front of queue

laminarc now supports {queue,start,run} --next to place the job at the
front of the queue instead of at the end.

resolves #162
This commit is contained in:
Oliver Giles
2022-01-22 09:07:08 +13:00
parent e581a0cf5d
commit 41ddd8fe4f
9 changed files with 69 additions and 37 deletions

View File

@@ -415,7 +415,7 @@ const Home = templateId => {
});
},
job_queued: function(data) {
state.jobsQueued.splice(0, 0, data);
state.jobsQueued.splice(state.jobsQueued.length - data.queueIndex, 0, data);
this.$forceUpdate();
},
job_started: function(data) {
@@ -594,7 +594,7 @@ const Job = templateId => {
});
},
job_queued: function(data) {
state.jobsQueued.splice(0, 0, data);
state.jobsQueued.splice(state.jobsQueued.length - data.queueIndex, 0, data);
this.$forceUpdate();
},
job_started: function(data) {