public ResultStatus ProcessComputation( ExecuteTask executeTask, ExecuteTask_Request request, out ExecuteTask_Result result) { return(this.ProcessComputation(executeTask, (ExecuteTask_Parameters)null, request, out result)); }
public ResultStatus GetActions( ExecuteTask executeTask, ExecuteTask_Request request, out ExecuteTask_Result result) { return(this.GetActions(executeTask, (ExecuteTask_Parameters)null, request, out result)); }
public ResultStatus CreateParametricData( ExecuteTask executeTask, ExecuteTask_Request request, out ExecuteTask_Result result) { return(this.CreateParametricData(executeTask, (ExecuteTask_Parameters)null, request, out result)); }
public ResultStatus LoadESigDetails( ExecuteTask executeTask, ExecuteTask_Request request, out ExecuteTask_Result result) { return(this.LoadESigDetails(executeTask, (ExecuteTask_LoadESigDetails_Parameters)null, request, out result)); }
public void run() { Console.WriteLine("patch start"); string name = "[PATCH]"; Logger logger = new Logger(logPath + name + DateTime.Now.ToString("yyyyMMdd") + ".log"); AutomationTaskParameter atpKill = new AutomationTaskParameter(); atpKill.ClientID = clientID; atpKill.AcknowledgeURL = urlKillAck; atpKill.Name = name; atpKill.Logger = logger; atpKill.IsRepeat = false; atpKill.CommandURL = urlKill; atpKill.Observer = this; KillTask taskKill = new KillTask(atpKill); taskKill.start(); if (taskKill.MissionCompleted) { Console.WriteLine("kill succeed. getting download command."); AutomationTaskParameter atpDownload = new AutomationTaskParameter(); atpDownload.ClientID = clientID; atpDownload.AcknowledgeURL = urlDownloadAck; atpDownload.Name = name; atpDownload.Logger = logger; atpDownload.IsRepeat = false; atpDownload.CommandURL = urlDownload; atpDownload.Observer = this; DownloadTaskParameter dtp = new DownloadTaskParameter(downloadPath); DownloadTask taskDownload = new DownloadTask(atpDownload, dtp); taskDownload.start(); if (taskDownload.MissionCompleted) { Console.WriteLine("download succeed. getting execution command."); AutomationTaskParameter atpExec = new AutomationTaskParameter(); atpExec.ClientID = clientID; atpExec.AcknowledgeURL = urlExecuteAck; atpExec.Name = name; atpExec.Logger = logger; atpExec.IsRepeat = false; atpExec.CommandURL = urlExecute; atpExec.Observer = this; ExecuteTask taskExec = new ExecuteTask(atpExec); taskExec.start(); if (taskExec.MissionCompleted) { Console.WriteLine("patch complete."); } } } logger.print("press <Enter> to exit."); Console.ReadLine(); }
public ResultStatus ValidateTaskTimers( ExecuteTask executeTask, ExecuteTask_Request request, out ExecuteTask_Result result) { return(this.ValidateTaskTimers(executeTask, (ExecuteTask_Parameters)null, request, out result)); }
public void Timeout(ExecuteTask state) { // Action that gets executed when the specified time is up Bus.Send(new CallLegacySystem()); // Reschedule the task RequestTimeout <ExecuteTask>(TimeSpan.FromMinutes(5)); }
public async Task Timeout(ExecuteTask state, IMessageHandlerContext context) { // Action that gets executed when the specified time is up await context.Send(new CallLegacySystem()); // Reschedule the task await RequestTimeout <ExecuteTask>(context, TimeSpan.FromMinutes(5)); }
/// <summary> /// On Packet Received. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnPacketReceived(object sender, PacketReceivedEventArgs e) { PacketHandler h = new PacketHandler(); ExecuteTask del = new ExecuteTask(FillComboBox); del += GetExercises; h.ProcessPacket(e, del); }
/// <summary> /// Packet Received Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnPacketReceived(object sender, PacketReceivedEventArgs e) { Console.WriteLine("bruh"); PacketHandler h = new PacketHandler(); _del = new ExecuteTask(ShowExamResult); h.ProcessPacket(e, _del); }
public ExecuteTaskMethod( ExecuteTask Cdo, ExecuteTaskMethods Method, ExecuteTask_Parameters Parameters) { this.Cdo = Cdo; this.ServiceMethod = Method; this.Parameters = Parameters; }
public void QueryExecuteOperate() { int begin = 3; int end = 9; Statement stmt = new Statement(); stmt.SetNamespace(args.ns); stmt.SetSetName(args.set); stmt.SetFilter(Filter.Range(binName1, begin, end)); Bin bin = new Bin("foo", "bar"); ExecuteTask task = client.Execute(null, stmt, Operation.Put(bin)); task.Wait(3000, 3000); string expected = bin.value.ToString(); stmt = new Statement(); stmt.SetNamespace(args.ns); stmt.SetSetName(args.set); stmt.SetFilter(Filter.Range(binName1, begin, end)); RecordSet rs = client.Query(null, stmt); try { int count = 0; while (rs.Next()) { Record record = rs.Record; string value = record.GetString(bin.name); if (value == null) { Assert.Fail("Bin " + bin.name + " not found"); } if (!value.Equals(expected)) { Assert.Fail("Data mismatch. Expected " + expected + ". Received " + value); } count++; } Assert.AreEqual(end - begin + 1, count); } finally { rs.Close(); } }
public bool LoadJob(ExecuteTask et, O p) { if (Idle) { task = et; param = p; Idle = false; return(true); } else { return(false); } }
public ResultStatus GetEnvironment( ExecuteTask cdo, ExecuteTask_Request request, out ExecuteTask_Result result) { result = (ExecuteTask_Result)null; try { return(((IExecuteTaskService)this._Channel).GetEnvironment(this._UserProfile, cdo, request, out result)); } catch (Exception ex) { return(this.OnThrowException(ex)); } }
internal void DoWork() { while (!ShouldStop) { if (Idle) { } else { task(param); task = null; Idle = false; } } }
public void QueryExecute() { int begin = 3; int end = 9; Statement stmt = new Statement(); stmt.SetNamespace(args.ns); stmt.SetSetName(args.set); stmt.SetFilters(Filter.Range(binName1, begin, end)); ExecuteTask task = client.Execute(null, stmt, "record_example", "processRecord", Value.Get(binName1), Value.Get(binName2), Value.Get(100)); task.Wait(); ValidateRecords(); }
public static void RunTest() { AerospikeClient client = new AerospikeClient("172.28.128.3", 3000); try { QueryTest.RunTest(); //Querytestten gelen binler; string binName = "querybinint"; string binName2 = "querybinint2"; Policy policy = new Policy(); policy.SetTimeout(100); //Assembly assembly = Assembly.GetExecutingAssembly(); //RegisterTask rtask = client.Register(policy, "example.lua", "example.lua", Language.LUA); //rtask.Wait(); //rtask.Wait(); //if (rtask.IsDone()) //{ // Console.WriteLine("done"); //} int begin = 1; int end = 10; Statement stmt = new Statement(); stmt.SetNamespace("test"); stmt.SetSetName("QueryTest"); stmt.SetFilter(Filter.Range("querybinint", begin, end)); ExecuteTask task = client.Execute(null, stmt, "example", "processRecord", Value.Get(binName), Value.Get(binName2), Value.Get(100)); //task.Wait(3000, 3000); task.Wait(); } finally { client.Close(); } }
public ResultStatus AddDataTransaction(ExecuteTask cdo) { this.OnBeforeCall(nameof(AddDataTransaction), (DCObject)cdo, (Parameters)null, (Request)null); ResultStatus res; try { res = !this._IsTransactionOpened ? this.GetAddDataTransactionException() : this.AddMethod((Method) new ExecuteTaskMethod(cdo, ExecuteTaskMethods.AddDataTransaction, (ExecuteTask_Parameters)null)); } catch (Exception ex) { res = this.OnThrowException(ex); } if (res.IsSuccess) { Result result; this.OnAfterCall(nameof(AddDataTransaction), res, (DCObject)cdo, (Parameters)null, (Request)null, result); } return(res); }
private void RunQueryExecute(AerospikeClient client, Arguments args, string indexName, string binName1, string binName2) { int begin = 3; int end = 9; console.Info("For ns={0} set={1} index={2} bin={3} >= {4} <= {5}", args.ns, args.set, indexName, binName1, begin, end); console.Info("Even integers: add 100 to existing " + binName1); console.Info("Multiple of 5: delete " + binName2 + " bin"); console.Info("Multiple of 9: delete record"); Statement stmt = new Statement(); stmt.SetNamespace(args.ns); stmt.SetSetName(args.set); stmt.SetFilters(Filter.Range(binName1, begin, end)); ExecuteTask task = client.Execute(args.writePolicy, stmt, "record_example", "processRecord", Value.Get(binName1), Value.Get(binName2), Value.Get(100)); task.Wait(); }
public ResultStatus ExecuteTransaction( ExecuteTask cdo, ExecuteTask_Request request, out ExecuteTask_Result result) { result = (ExecuteTask_Result)null; this.OnBeforeCall(nameof(ExecuteTransaction), (DCObject)cdo, (Parameters)null, (Request)request); ResultStatus res; try { res = !this._IsTransactionOpened ? ((IExecuteTaskService)this._Channel).ExecuteTransaction(this._UserProfile, cdo, request, out result) : this.AddMethod((Method) new ExecuteTaskMethod(cdo, ExecuteTaskMethods.ExecuteTransaction, (ExecuteTask_Parameters)null)); } catch (Exception ex) { res = this.OnThrowException(ex); } if (res.IsSuccess) { this.OnAfterCall(nameof(ExecuteTransaction), res, (DCObject)cdo, (Parameters)null, (Request)request, (Result)result); } return(res); }
public ResultStatus GetActions( ExecuteTask executeTask, ExecuteTask_Parameters parameters, ExecuteTask_Request request, out ExecuteTask_Result result) { result = (ExecuteTask_Result)null; this.OnBeforeCall(nameof(GetActions), (DCObject)executeTask, (Parameters)parameters, (Request)request); ResultStatus res; try { res = !this._IsTransactionOpened ? ((IExecuteTaskService)this._Channel).GetActions(this._UserProfile, executeTask, parameters, request, out result) : this.AddMethod((Method) new ExecuteTaskMethod(executeTask, ExecuteTaskMethods.GetActions, parameters)); } catch (Exception ex) { res = this.OnThrowException(ex); } if (res.IsSuccess) { this.OnAfterCall(nameof(GetActions), res, (DCObject)executeTask, (Parameters)parameters, (Request)request, (Result)result); } return(res); }
public ResultStatus Load(ExecuteTask executeTask) { return(this.Load(executeTask, (ExecuteTask_Parameters)null, (ExecuteTask_Request)null, out ExecuteTask_Result _)); }
protected void _timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { ExecuteTask?.Invoke(sender, e); }
public ResultStatus ValidateTaskTimers(ExecuteTask executeTask) { return(this.ValidateTaskTimers(executeTask, (ExecuteTask_Parameters)null, (ExecuteTask_Request)null, out ExecuteTask_Result _)); }
public ResultStatus CreateParametricData(ExecuteTask executeTask) { return(this.CreateParametricData(executeTask, (ExecuteTask_Parameters)null, (ExecuteTask_Request)null, out ExecuteTask_Result _)); }
public ResultStatus ExecuteTransaction(ExecuteTask cdo) { return(this.ExecuteTransaction(cdo, (ExecuteTask_Request)null, out ExecuteTask_Result _)); }
public ResultStatus GetActions(ExecuteTask executeTask) { return(this.GetActions(executeTask, (ExecuteTask_Parameters)null, (ExecuteTask_Request)null, out ExecuteTask_Result _)); }
public ActionResult CreateTask() { bool resultAll = true; string publisherId = "1552607"; string taskTitle = Request.Form["title"]; string executorsId = Request.Form["IDs"]; string tag = Request.Form["belongTo"]; DateTime publishedDate = DateTime.Now; var stringDate = Request.Form["data"]; string[] splitStringDate = stringDate.Split('/'); if (splitStringDate[0].Length == 1) { splitStringDate[0] = "0" + splitStringDate[0]; } if (splitStringDate[1].Length == 1) { splitStringDate[1] = "0" + splitStringDate[1]; } stringDate = string.Join("/", splitStringDate); DateTime date = DateTime.ParseExact(stringDate, "MM/dd/yyyy", System.Globalization.CultureInfo.CurrentCulture); DateTime deadlineDate = date; string description = Request.Form["description"]; bool idJudge = JudgeExecutors(executorsId, publisherId); if (idJudge) { var newTask = new Task { taskTitle = taskTitle, introduction = description, publishDate = publishedDate, deadlineDate = deadlineDate, executeStatement = 1, SID = publisherId, tag = tag }; if (ModelState.IsValid) { db.tasks.Add(newTask); db.SaveChanges(); } string[] splitExecutorsId = executorsId.Split(' '); for (int i = 0; i < splitExecutorsId.Length; i++) { var newExecuteTask = new ExecuteTask { SID = splitExecutorsId[i], executeStatement = 1, taskID = newTask.taskID }; if (ModelState.IsValid) { db.tasks.Add(newTask); db.SaveChanges(); } } } else { resultAll = false; } if (resultAll) { return(Redirect("/Users/TaskResult")); } else { return(null); } }