AWS Thinkbox Discussion Forums

Programmatically "undelete" jobs

Just noticed there is no “Undelete job” command (that I can see) available via the REST API or deadlinecommand. Right now, I need to undelete about 120 jobs due to some mysterious event handler problems, but since there is no “Deleted Date/Time” column in the “Undelete Jobs” dialog, I can’t just grab them all at once manually.

I’m guessing there is currently no programmatic method for “un-deleting” jobs, but would it be possible to A) add one, and B) add a column (and the associated data) to the “Undelete Jobs” dialog so one could easily sort jobs by their deletion date/time?

Thanks

P.S. Actually, is the “un-delete” operation just as simple as moving a document from “DeletedJobs” to “Jobs” in Mongo?

Yeah, there currently isn’t any functions to deal with undeleted Jobs, I’ll log a ticket for that.

It probably shouldn’t be too bad to add a ‘Deleted Time’ column in the un-delete UI either, I’ll have a look at that too.

As for how we handle it in the DB, that’s essentially what we’re doing. There’s a couple extra housekeeping things too… We keep a stub in DeletedDocuments that keeps track of which documents were deleted when (for the Monitor’s auto-updating benefit), so we delete this stub when we undelete a Job. We also need to update the Job’s ‘LastWriteTime’ timestamp, so that the Monitor’s updates pick up the undeleted Job.

Privacy | Site terms | Cookie preferences