示例#1
0
 private int addRun(IndexIdentity identity, KeyValue <string, int>[] files, ClientTask.Run run)
 {
     if ((uint)identity.Index < (uint)deployPool.PoolIndex)
     {
         object arrayLock = deployPool.ArrayLock;
         Monitor.Enter(arrayLock);
         try
         {
             return(deployPool.Array[identity.Index].AddTask(identity.Identity, new Task {
                 FileIndexs = files, ServerDirectory = new DirectoryInfo(run.ServerPath), Type = TaskType.Run, RunFileName = run.FileName, RunSleep = run.Sleep, IsWaitRun = run.IsWait
             }));
         }
         finally { Monitor.Exit(arrayLock); }
     }
     return(-1);
 }
示例#2
0
        protected virtual int addRun(AutoCSer.Net.TcpInternalServer.ServerSocketSender sender, ClientTask.Run run)
        {
            DeployInfo deployInfo = ((ClientObject)sender.ClientObject).CurrentDeploy;

            if (deployInfo != null)
            {
                return(deployInfo.AddTask(run));
            }
            return(-1);
        }
示例#3
0
 /// <summary>
 /// 添加文件数据源
 /// </summary>
 /// <param name="fileSources"></param>
 /// <param name="run"></param>
 /// <param name="serverTask"></param>
 private void appendSource(Dictionary <HashString, FileSource> fileSources, ClientTask.Run run, ref ClientTaskInfo serverTask)
 {
     appendSource(fileSources, run, ref serverTask, run.FileName);
 }