Changes in src/Actions/ActionQueue.cpp [601ef8:f3db60]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/ActionQueue.cpp
r601ef8 rf3db60 63 63 history(new ActionHistory), 64 64 #ifndef HAVE_ACTION_THREAD 65 lastActionOk(true) 65 lastActionOk(true), 66 66 #else 67 67 CurrentAction(0), 68 68 lastActionOk(true), 69 69 run_thread(boost::bind(&ActionQueue::run, this)), 70 run_thread_isIdle(true) 71 #endif 70 run_thread_isIdle(true), 71 #endif 72 dryrun_flag(false) 72 73 { 73 74 // channels of observable … … 109 110 #ifndef HAVE_ACTION_THREAD 110 111 try { 111 newaction->call(); 112 if (!isDryRun(newaction)) 113 newaction->call(); 112 114 lastActionOk = true; 113 115 } catch(ActionFailureException &e) { … … 175 177 LOG(0, "Calling Action " << actionqueue[CurrentAction]->getName() << " ... "); 176 178 try { 177 actionqueue[CurrentAction]->call(); 179 if (!isDryRun(actionqueue[CurrentAction])) 180 actionqueue[CurrentAction]->call(); 178 181 pushStatus("SUCCESS: Action "+actionqueue[CurrentAction]->getName()+" successful."); 179 182 lastActionOk = true; … … 380 383 } 381 384 385 bool ActionQueue::isDryRun(const Action *_nextaction) const 386 { 387 bool status = dryrun_flag; 388 status &= (_nextaction->getName() != "no-dry-run"); 389 return status; 390 } 382 391 383 392 CONSTRUCT_SINGLETON(ActionQueue)
Note:
See TracChangeset
for help on using the changeset viewer.