Exemplo n.º 1
0
 /*
  *  Run Commands on machine in sequence, one after another.
  *  And the result will be returned when all of them are finished.
  */
 public Task <string> StartCmdInSeqTransaction(IGammaMachineInfo machine, string[] commands)
 {
     return(Task.Run(() => {
         var trx = GammaClientTXFactory.GetCmdExecTX(machine, commands);
         AddTransaction(trx);
         return StartTransactions(trx, machine, commands);
     }));
 }
Exemplo n.º 2
0
 /*
  * return the task that run the command on the node with seq# not changed.
  * if the command are considered as in the same group, they should use this to start the transaction.
  */
 private Task <string> StartCmdGroupTransaction(IGammaMachineInfo machine, string command)
 {
     return(Task.Run(() => {
         var trx = GammaClientTXFactory.GetCmdExecTX(machine, command);
         GammaClientTXLogger.GetInstance().RegisterTransaction(trx);
         AddTransaction(trx, seq);
         return StartTransaction(trx, machine, command);
     }));
 }