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

Function abortTask

ui/media/js/task-manager.js:343–361  ·  view source on GitHub ↗
(task)

Source from the content-addressed store, hash-verified

341}
342
343function abortTask(task) {
344 if (!task.isProcessing) {
345 return false
346 }
347 task.isProcessing = false
348 task.progressBar.classList.remove("active")
349 task["taskStatusLabel"].style.display = "none"
350 task["stopTask"].innerHTML = '<i class="fa-solid fa-trash-can"></i> Remove'
351 if (!task.instances?.some((r) => r.isPending)) {
352 return
353 }
354 task.instances.forEach((instance) => {
355 try {
356 instance.abort()
357 } catch (e) {
358 console.error(e)
359 }
360 })
361}
362
363async function stopAllTasks() {
364 getUncompletedTaskEntries().forEach((taskEntry) => {

Callers 3

createTaskFunction · 0.85
stopAllTasksFunction · 0.85
onTaskErrorHandlerFunction · 0.85

Calls 1

abortMethod · 0.80

Tested by

no test coverage detected