Commit 1e960a54 authored by Leigh Stoller's avatar Leigh Stoller

Add Reset() function to clean out a webtask for reuse.

parent 10d66f59
<?php
#
# Copyright (c) 2006-2015 University of Utah and the Flux Group.
# Copyright (c) 2006-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -115,6 +115,17 @@ class WebTask {
return 0;
}
# Reset to clean state.
function Reset() {
$task_id = $this->task_id();
DBQueryFatal("update web_tasks set ".
" exited=null,process_id=0,exitcode=0,task_data=''".
"where task_id='$task_id'");
return $this->Refresh();
}
# accessors
function field($name) {
return (is_null($this->webtask) ? -1 : $this->webtask[$name]);
......
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