You can run this JavaScript snippet to clear all your finished jobs. Save it as a snippet in devtools, then invoke it on any enrich page.
Code is pasted below the screenshot.
//
// Delete finished jobs.
fetch("/api/LongRunningJob")
.then(r=>r.json())
.then(d=>{
if (!Array.isArray(d)) {
return;
}
d.forEach((item)=>{
if (/^Finished/.test(String(item.State))) {
fetch(`/api/LongRunningJob/${item.Id}`, { method: "DELETE" })
.then(console.info.bind(console))
.catch(console.error.bind(console));
}
});
});
-
Running your code gave me "fetch(...).done is not a function", but changing "done" to "then" worked.
1 -
Replace 'Finished' with 'Cancelled' or 'Error' to clear those jobs.
1 -
I took what Jared gave and updated the script to take care of it without making changes. You may need to run it twice to clear everything up as some things were not caught on the first round.
To do this in Chrome, click "F12" key, click "Console", type "allow pasting" in the console window, copy and paste below code into the console window, hit "enter" key.
fetch("/api/LongRunningJob")
.then(r=>r.json())
.then(d=>{
if (!Array.isArray(d)) {
return;
}
d.forEach((item)=>{
if (/^Finished/.test(String(item.State))) {
fetch(`/api/LongRunningJob/${item.Id}`, { method: "DELETE" })
.then(console.info.bind(console))
.catch(console.error.bind(console));
}
});d.forEach((item)=>{
if (/^Cancelled/.test(String(item.State))) {
fetch(`/api/LongRunningJob/${item.Id}`, { method: "DELETE" })
.then(console.info.bind(console))
.catch(console.error.bind(console));
}
});d.forEach((item)=>{
if (/^Error/.test(String(item.State))) {
fetch(`/api/LongRunningJob/${item.Id}`, { method: "DELETE" })
.then(console.info.bind(console))
.catch(console.error.bind(console));
}
});});
1 -
Good catch Tobias Månsson. I've updated the code.
0
Please sign in to leave a comment.
Comments
4 comments