Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/ActionQueue.cpp

    r601ef8 rf3db60  
    6363    history(new ActionHistory),
    6464#ifndef HAVE_ACTION_THREAD
    65     lastActionOk(true)
     65    lastActionOk(true),
    6666#else
    6767    CurrentAction(0),
    6868    lastActionOk(true),
    6969    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)
    7273{
    7374  // channels of observable
     
    109110#ifndef HAVE_ACTION_THREAD
    110111  try {
    111     newaction->call();
     112    if (!isDryRun(newaction))
     113      newaction->call();
    112114    lastActionOk = true;
    113115  } catch(ActionFailureException &e) {
     
    175177      LOG(0, "Calling Action " << actionqueue[CurrentAction]->getName() << " ... ");
    176178      try {
    177         actionqueue[CurrentAction]->call();
     179        if (!isDryRun(actionqueue[CurrentAction]))
     180          actionqueue[CurrentAction]->call();
    178181        pushStatus("SUCCESS: Action "+actionqueue[CurrentAction]->getName()+" successful.");
    179182        lastActionOk = true;
     
    380383}
    381384
     385bool ActionQueue::isDryRun(const Action *_nextaction) const
     386{
     387  bool status = dryrun_flag;
     388  status &= (_nextaction->getName() != "no-dry-run");
     389  return status;
     390}
    382391
    383392CONSTRUCT_SINGLETON(ActionQueue)
Note: See TracChangeset for help on using the changeset viewer.