diff --git a/sequencerd/sequence.cpp b/sequencerd/sequence.cpp index 338b6077..277769bd 100644 --- a/sequencerd/sequence.cpp +++ b/sequencerd/sequence.cpp @@ -2891,6 +2891,7 @@ namespace Sequencer { if ( this->tcs_preauth_time > 0 ) this->notify_tcs_next_target = true; else this->notify_tcs_next_target = false; this->arm_readout_flag = true; // enables the async_listener to look for the readout and clear the EXPOSE bit + this->wait_state_manager.set( Sequencer::SEQ_WAIT_EXPOSE ); // set EXPOSE bit this->set_imgtype(); @@ -2913,7 +2914,6 @@ namespace Sequencer { } error = this->target.update_state( Sequencer::TARGET_EXPOSING ); // set EXPOSE state in database - this->wait_state_manager.set( Sequencer::SEQ_WAIT_EXPOSE ); // set EXPOSE bit return error; } diff --git a/sequencerd/sequencer_interface.cpp b/sequencerd/sequencer_interface.cpp index 36c07823..070f33fa 100644 --- a/sequencerd/sequencer_interface.cpp +++ b/sequencerd/sequencer_interface.cpp @@ -247,7 +247,7 @@ namespace Sequencer { std::map bindings; if ( use_id ) { - condition = "SET_ID like :setid"; + condition = "SET_ID = :setid"; bindings = { { "setid", mysqlx::Value(setid_in) } }; } else { @@ -403,7 +403,7 @@ namespace Sequencer { } try { - const std::string condition("OBSERVATION_ID like :obsid"); + const std::string condition("OBSERVATION_ID = :obsid"); const std::string order("OBSERVATION_ID"); std::map bindings = { { "obsid", mysqlx::Value(obsid) } }; @@ -533,7 +533,7 @@ namespace Sequencer { // Find a row in the SQL active observations table, // the next one (in order) where state is state_in. // - const std::string condition("SET_ID like :setid && STATE like :state"); + const std::string condition("SET_ID = :setid && STATE like :state"); const std::string order("OBS_ORDER"); std::map bindings = { { "state", mysqlx::Value(state_in) }, { "setid", mysqlx::Value(this->setid) } }; @@ -773,7 +773,7 @@ namespace Sequencer { // vector identifies the fields to retrieve and is initialized by the TargetInfo() // class initializer list. // - const std::string condition("OBSERVATION_ID like :obsid"); + const std::string condition("OBSERVATION_ID = :obsid"); std::map bindings = { { "obsid", mysqlx::Value(this->obsid) } }; // read from active targets table