WIP: Allow jobs to be submitted in paused
status
#104318
@ -72,6 +72,9 @@ export default {
|
||||
onButtonRequeue() {
|
||||
return this._handleJobActionPromise(this.jobs.requeueJobs(), 'requeueing');
|
||||
},
|
||||
onButtonPause() {
|
||||
return this._handleJobActionPromise(this.jobs.pauseJobs(), 'marked for pausing');
|
||||
},
|
||||
|
||||
_handleJobActionPromise(promise, description) {
|
||||
return promise.then(() => {
|
||||
|
@ -33,6 +33,9 @@ export const useJobs = defineStore('jobs', {
|
||||
canRequeue() {
|
||||
return this._anyJobWithStatus(['canceled', 'completed', 'failed', 'paused']);
|
||||
},
|
||||
canPause() {
|
||||
return this._anyJobWithStatus(['active', 'queued', 'canceled']);
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
setIsJobless(isJobless) {
|
||||
@ -74,6 +77,9 @@ export const useJobs = defineStore('jobs', {
|
||||
cancelJobs() {
|
||||
return this._setJobStatus('cancel-requested');
|
||||
},
|
||||
pauseJobs() {
|
||||
return this._setJobStatus('pause-requested');
|
||||
},
|
||||
requeueJobs() {
|
||||
return this._setJobStatus('requeueing');
|
||||
},
|
||||
|
@ -18,9 +18,6 @@ export const useTasks = defineStore('tasks', {
|
||||
activeTaskID: '',
|
||||
}),
|
||||
getters: {
|
||||
canPause() {
|
||||
return this._anyTaskWithStatus(['active', 'queued', 'cancelled']);
|
||||
},
|
||||
canCancel() {
|
||||
return this._anyTaskWithStatus(['queued', 'active', 'soft-failed']);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user