WIP: Allow jobs to be submitted in paused status #104318

Closed
David Zhang wants to merge 32 commits from David-Zhang-10/flamenco:submit-as-paused into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
3 changed files with 9 additions and 3 deletions
Showing only changes of commit ba454cd4a0 - Show all commits

View File

@ -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(() => {

View File

@ -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');
},

View File

@ -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']);
},