anchor.diff:      case find_org_by_worker(Pid) of
           #org{}=Org ->
               mark_org(nodes_failed, Org#org.guid),
  +            error_logger:error_msg("nodes failed for org ~s~n", [Org#org.name]),
  +            %% this org has failed nodes.  To minimize downtime for this org, we will fail
  +            %% the migration and turn on writes back in couch-land.
  +            darklaunch_enable_node_writes(Org#org.name),
               WorkerCount = Workers - 1,
               NextState = case WorkerCount > 0 of
                               true -> StateName;
                               false -> ready
                           end,
  -            %% this org has failed nodes.  To minimize downtime for this org, we will fail
  -            %% the migration and turn on writes back in couch-land.
  -            darklaunch_enable_node_writes(Org#org.name),
  -            {next_state, NextState, State#state{workers = WorkerCount}};
  +            %% since there was a node failure, we'll make this the last batch for this run
  +            %% by setting batches to zero.
  +            {next_state, NextState, State#state{workers = WorkerCount, batches = 0}};
           _NotFound ->
               %% ignore the msg
               {next_state, StateName, State}
  
positive.code: 
  -record(state, {couch_cn,
                  preload_amt,
                  workers=0}).
  
  -record(org, {guid,
                name,
  
negative.code: %% -*- erlang-indent-level: 4;indent-tabs-mode: nil;fill-column: 92 -*-
  %% ex: ts=4 sw=4 et
  %% @author Kevin Smith <kevin@opscode.com>
  %% @author Seth Falcon <seth@opscode.com>
  %% @copyright 2011 Opscode, Inc.
  -module(mover_manager).
  
  