Commit 731b4885 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Send internal event anytime we change the experiment state; this state

is currently only for use by the RPC server.
parent 4bd5575d
......@@ -458,6 +458,7 @@ sub TBDB_TBEVENT_NODESTATE { "TBNODESTATE"; }
sub TBDB_TBEVENT_NODEOPMODE { "TBNODEOPMODE"; }
sub TBDB_TBEVENT_CONTROL { "TBCONTROL"; }
sub TBDB_TBEVENT_COMMAND { "TBCOMMAND"; }
sub TBDB_TBEVENT_EXPTSTATE { "TBEXPTSTATE"; }
#
# For nodes, we use this set of events.
......@@ -1301,6 +1302,14 @@ sub SetExpState($$$)
{
my($pid, $eid, $state) = @_;
if ($EVENTSYS) {
return EventSendFatal(objtype => TBDB_TBEVENT_EXPTSTATE,
objname => "$pid/$eid",
eventtype => $state,
expt => "$pid/$eid",
host => $BOSSNODE);
}
my $query_result =
DBQueryWarn("update experiments set state='$state' ".
"where eid='$eid' and pid='$pid'");
......
Supports Markdown
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