Commit 0c03e69b authored by Leigh Stoller's avatar Leigh Stoller

Add method to "reset" an existing webtask back to clean state, so

that it can be reused as for dataset snapshots. This was one of the
reasons that imaging progress modal was not slightly messed up for
datasets.
parent 408c20cf
#!/usr/bin/perl -wT
#
# Copyright (c) 2013-2015 University of Utah and the Flux Group.
# Copyright (c) 2013-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -155,6 +155,19 @@ sub Delete($)
return 0;
}
sub Reset($)
{
my ($self) = @_;
my $task_id = $self->task_id();
DBQueryWarn("update web_tasks set ".
" exited=null,process_id=0,exitcode=0,task_data=''".
"where task_id='$task_id'")
or return -1;
return $self->Refresh();
}
sub DeleteByObject($$)
{
my ($class, $uuid) = @_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment