Пример #1
0
        static ExecutionService.TaskDescription CreateLsTask(ulong taskId)
        {
            var task = new ExecutionService.TaskDescription()
            {
                UserId = "sm",
                WfId   = "GunDDoSing",
                TaskId = taskId,

                Package = "ls",

                InputFiles = new ExecutionService.TaskFileDescription[]
                {
                    new ExecutionService.TaskFileDescription()
                    {
                        SlotName  = "in_file",
                        FileName  = "excluder.conf",
                        StorageId = "0FPITTIR0W1HX947XFWQ",
                    }
                },

                ExecParams = String.IsNullOrEmpty(RESOURCE)? null: new Dictionary <string, string>()
                {
                    { "Resource", RESOURCE }
                }
            };

            return(task);
        }
Пример #2
0
        static ExecutionService.TaskDescription CreateDummyTask(ulong taskId)
        {
            var task = new ExecutionService.TaskDescription()
            {
                UserId = "sm",
                WfId   = "GunDDoSing",
                TaskId = taskId,

                Package = "dummy",

                Params = new Dictionary <string, string>()
                {
                    { "wait_time", "3000" },
                }
            };

            return(task);
        }
Пример #3
0
        static ExecutionService.TaskDescription CreateTestpTask(ulong taskId)
        {
            var task = new ExecutionService.TaskDescription()
            {
                UserId = "sm",
                WfId   = "GunDDoSing",
                TaskId = taskId,

                Package = "testp",

                Params = new Dictionary <string, string>()
                {
                    { "in0", rnd.Next(1, 100).ToString() },
                    { "in1", rnd.Next(1, 100).ToString() },
                },

                ExecParams = String.IsNullOrEmpty(RESOURCE)? null: new Dictionary <string, string>()
                {
                    { "Resource", RESOURCE }
                }
            };

            return(task);
        }