MCPcopy Index your code
hub / github.com/easydiffusion/easydiffusion / _setStatus

Method _setStatus

ui/media/js/engine.js:437–450  ·  view source on GitHub ↗
(status)

Source from the content-addressed store, hash-verified

435 return this.#status
436 }
437 _setStatus(status) {
438 if (status === this.#status) {
439 return
440 }
441 const currentIdx = TASK_STATUS_ORDER.indexOf(this.#status)
442 if (currentIdx < 0) {
443 throw Error(`The task status ${this.#status} is final and can't be changed.`)
444 }
445 const newIdx = TASK_STATUS_ORDER.indexOf(status)
446 if (newIdx >= 0 && newIdx < currentIdx) {
447 throw Error(`The task status ${status} can't replace ${this.#status}.`)
448 }
449 this.#status = status
450 }
451
452 /** Send current task to server.
453 * @param {*} [timeout=-1] Optional timeout value in ms

Callers 9

postMethod · 0.95
waitUntilMethod · 0.95
enqueueMethod · 0.95
readerMethod · 0.80
postMethod · 0.80
startMethod · 0.80
postMethod · 0.80
startMethod · 0.80
jasmineSpec.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected