private void Update() { mJob.Complete(); // copy connection state from native container mState = mConnection[0].GetState(mDriver); // copy received events from native container var decode = new DecodeEvent(); for (var i = 0; i < mEvents.Length; i++) { mLog.Add(decode.Call(mEvents[i])); mEvents.RemoveAtSwapBack(i); --i; } // copy pending events to native container to send to host while (mLog.HasPending) { mEvents.Add(mLog.PopPending().Into()); } // schedule next update var update = new UpdateJob(mDriver, mConnection, mEvents); mJob = mDriver.ScheduleUpdate(); mJob = update.Schedule(mJob); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var commandBuffer = _commandBufferSystem.CreateCommandBuffer().ToConcurrent(); var updateJob = new UpdateJob { attackTemplate = _enemyAttack, movementTemplate = _enemyMovement, entityType = GetArchetypeChunkEntityType(), raycastResultStateType = GetArchetypeChunkComponentType <RaycastResultState>(false), raycastResultType = GetArchetypeChunkComponentType <RaycastResult>(true), movementType = GetArchetypeChunkComponentType <Movement>(true), attackType = GetArchetypeChunkComponentType <EnemyAttack>(true), targetType = GetArchetypeChunkComponentType <TargetOwnership>(false), commands = commandBuffer }; var cleanupJob = new CleanupJob { commands = commandBuffer }; inputDeps = updateJob.Schedule(_updateQuery, inputDeps); inputDeps = updateJob.Schedule(_updateQueryNoState, inputDeps); inputDeps = cleanupJob.Schedule(_cleanupQuery, inputDeps); _commandBufferSystem.AddJobHandleForProducer(inputDeps); return(inputDeps); }
public virtual Model.Job Update(UpdateJob job, string jobId) { var uriBuilder = this.GetRequestStringBuilder(string.Format(UpdateJobUrl, projectId, jobId)); var response = ExecutePutRequest(uriBuilder, job, auth); return(JsonConvert.DeserializeObject <Model.Job>(response["response"]["data"].ToString())); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var entityType = GetArchetypeChunkEntityType(); JobHandle playerHandle; var playerEntity = playerGroup.ToEntityArray(Allocator.TempJob, out playerHandle); var updateJob = new UpdateJob { snapshotFromEntity = GetBufferFromEntity <ShipSnapshotData>(), targetTick = NetworkTimeSystem.interpolateTargetTick }; inputDeps = updateJob.Schedule(this, inputDeps); var destroyJob = new DestroyJob { commandBuffer = m_Barrier.CreateCommandBuffer().ToConcurrent(), entityType = entityType, playerEntity = playerEntity, playerStateFromEntity = GetComponentDataFromEntity <PlayerStateComponentData>() }; inputDeps = destroyJob.Schedule(destroyGroup, JobHandle.CombineDependencies(inputDeps, playerHandle)); m_Barrier.AddJobHandleForProducer(inputDeps); return(inputDeps); }
private static void Jobs(OAuthAuthenticationStrategy auth) { var jobApiClient = new JobApiClient(auth, projectId); foreach (var job in jobApiClient.Get("ApiSample", new List <string>() { "AWAITING_AUTHORIZATION", "IN_PROGRESS", "IN_PROGRESS" })) { Console.WriteLine(job.jobName); } var jobRequest = new CreateJob(); jobRequest.jobName = "ApiSample_Job_" + Guid.NewGuid(); jobRequest.description = "test"; jobRequest.dueDate = DateTime.Now.AddMonths(1).ToString("yyyy-MM-ddTHH:mm:ssZ"); jobRequest.targetLocaleIds = new List <string>() { "ru-RU" }; jobRequest.callbackUrl = "https://www.callback.com/smartling/job"; jobRequest.callbackMethod = "GET"; jobRequest.referenceNumber = "test"; var createdJob = jobApiClient.Create(jobRequest); createdJob = jobApiClient.GetById(createdJob.translationJobUid); var jobs = jobApiClient.Get(); var processes = jobApiClient.GetProcesses(jobs.First().translationJobUid); var updateJob = new UpdateJob(); updateJob.jobName = jobRequest.jobName; updateJob.description = "test2"; updateJob.dueDate = DateTime.Now.AddMonths(1).ToString("yyyy-MM-ddTHH:mm:ssZ"); var updatedJob = jobApiClient.Update(updateJob, jobs.First().translationJobUid); jobs = jobApiClient.Get(); jobApiClient.AddLocale("nl-NL", jobs.First().translationJobUid); var batchApiClient = new BatchApiClient(auth, projectId, String.Empty); var batch = batchApiClient.Create(new CreateBatch() { authorize = true, translationJobUid = jobs.First().translationJobUid }); string filePath = "ApiSample_" + Guid.NewGuid(); string fileUri = "/master/" + filePath; batchApiClient.UploadFile(new BatchUpload.Builder().CreateUpload(@"C:\Sample.xml", fileUri, "xml", new List <string> { "ru-RU" }, batch.batchUid).WithNameSpace(filePath)); batchApiClient.Execute(batch.batchUid); var batchResult = batchApiClient.Get(batch.batchUid); }
//----------------------------------------------------------------------------- protected override JobHandle OnUpdate(JobHandle inputDeps) { if (m_Input.Buttons[0].Values["ShowFlowfield"].Status == InputButtons.UP) { Main.ActiveInitParams.m_drawFlowField = !Main.ActiveInitParams.m_drawFlowField; } if (m_Input.Buttons[0].Values["ShowHeatmap"].Status == InputButtons.UP) { Main.ActiveInitParams.m_drawHeatField = !Main.ActiveInitParams.m_drawHeatField; } if (m_Input.Buttons[0].Values["SmoothFlowfield"].Status == InputButtons.UP) { Main.ActiveInitParams.m_smoothFlowField = !Main.ActiveInitParams.m_smoothFlowField; } var tileSystem = m_TileSystem; if (tileSystem.LastGeneratedQueryHandle == TileSystem.k_InvalidHandle || !Main.ActiveInitParams.m_drawFlowField) { return(inputDeps); } var update = new UpdateJob { Tiles = m_Tiles, Settings = m_Tiles.Settings[0], Handle = tileSystem.LastGeneratedQueryHandle, FlowField = tileSystem.GetFlowFieldCopy(tileSystem.LastGeneratedQueryHandle, Allocator.TempJob), TerrainHeight = Main.TerrainHeight }; return(update.Schedule(update.Tiles.Transforms.Length, 64, inputDeps)); }
public void Test_UpdateClass_GetCommandMethod_Returns_A_bool() { DbJob job = new DbJob(); job.JobId = 5; List <DbJob> jobs = new List <DbJob>(); jobs.Add(job); List <string> deleteskills = new List <string>(); deleteskills.Add(".Net"); List <string> Addedskills = new List <string>(); Addedskills.Add("SQL"); Addedskills.Add("Java"); Addedskills.Add("VMware"); UpdateJob upjob = new UpdateJob(); bool result = upjob.GetCommand(jobs, deleteskills); Assert.IsInstanceOf(typeof(bool), result); }
public JobManagement_Should(ITestOutputHelper output) { _output = output ?? throw new ArgumentNullException(nameof(output)); _searchCmd = new SearchJobs() { Config = OpnSenseDevice.Instance, Logger = this }; _addCmd = new AddJob() { Config = OpnSenseDevice.Instance, Logger = this }; _updateCmd = new UpdateJob() { Config = OpnSenseDevice.Instance, Logger = this }; _toggleCmd = new ToggleJob() { Config = OpnSenseDevice.Instance, Logger = this }; _getCmd = new GetJobDetails() { Config = OpnSenseDevice.Instance, Logger = this }; _deleteCmd = new DeleteJob() { Config = OpnSenseDevice.Instance, Logger = this }; }
public async Task <UpdateJob> CreateAutoUpdateJobAsync(string agId, UpdateJob body, CancellationToken cancellationToken = default) { var response = await GetActiveGatesAutoUpdateJobsUrl(agId) .PostJsonAsync(body, cancellationToken) .ReceiveJsonWithErrorChecking <UpdateJob>() .ConfigureAwait(false); return(response); }
public ActionResult updateJobDone(UpdateJob job) { if (ModelState.IsValid) { return(Ok(service.UpdateJobDone(job.TaskId, job.JobId, job.Done))); } return(BadRequest()); }
public JobHandle ScheduleUpdate(JobHandle dep = default(JobHandle)) { m_updateTime = m_timer.ElapsedMilliseconds; var job = new UpdateJob { driver = this }; var handle = job.Schedule(dep); return(m_NetworkInterface.ScheduleReceive(this, handle)); }
private void ThrowJob(Jobs job) { if (UpdateJob != null) { foreach (UpdateJobHandler t in UpdateJob.GetInvocationList()) { t.BeginInvoke(job, null, null); } } }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var job = new UpdateJob() { dynamicBoneTransform = componentGroup.dynamicBoneTransform, }; var handle = job.Schedule(componentGroup.transformAccessArray, inputDeps); return(handle); }
public JobHandle ScheduleUpdate(JobHandle dep = default(JobHandle)) { dep = new CleanJob { driver = this }.Schedule(dep); dep = new UpdateJob { driver = this }.Schedule(dep); return(dep); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { float dt = Time.deltaTime; UpdateJob job = new UpdateJob { deltaTime = dt }; return(job.Schedule(this, inputDeps)); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var updateJob = new UpdateJob { snapshotFromEntity = GetBufferFromEntity <BulletSnapshotData>(), targetTick = NetworkTimeSystem.interpolateTargetTick }; return(updateJob.Schedule(this, inputDeps)); }
private void Update() { mJob.Complete(); var updatec = new UpdateConnectionsJob(mDriver, mConnections); var updateh = new UpdateJob(mDriver.ToConcurrent(), mConnections.AsDeferredJobArray()); mJob = mDriver.ScheduleUpdate(); mJob = updatec.Schedule(mJob); mJob = updateh.Schedule(mConnections, 1, mJob); }
private void Schedule() { job = new UpdateJob() { deltaTime = Time.deltaTime, velocities = velocities, rotations = rotations, bounds = bounds }; jobHandle = job.Schedule(transforms); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var job = new UpdateJob() { deltaTime = Time.deltaTime, position = componentGroup.position, velocity = componentGroup.velocity }; return(job.Schedule(componentGroup.transformsAccess)); }
protected override JobHandle OnUpdate(JobHandle inputDependencies) { var job = new UpdateJob(); job.LastSystemVersion = this.LastSystemVersion; job.InputAType = GetArchetypeChunkComponentType <InputA>(true); job.InputBType = GetArchetypeChunkComponentType <InputB>(true); job.OutputType = GetArchetypeChunkComponentType <Output>(false); return(job.Schedule(m_Query, inputDependencies)); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var job = new UpdateJob() { owner = componentGroup.owner, chainDataArrayArray = GetFixedArrayFromEntity <ChainData> (true), }; var handle = job.Schedule(componentGroup.transformAccessArray); handle.Complete(); return(handle); }
protected override void OnUpdate() { var job = new UpdateJob(); job.LastSystemVersion = this.LastSystemVersion; job.InputATypeHandle = GetComponentTypeHandle <InputA>(true); job.InputBTypeHandle = GetComponentTypeHandle <InputB>(true); job.OutputTypeHandle = GetComponentTypeHandle <Output>(false); this.Dependency = job.ScheduleParallel(m_Query, this.Dependency); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var job = new UpdateJob() { dynamicBoneTransform = componentGroup.dynamicBoneTransform, dynamicBoneParticleFromEntity = GetFixedArrayFromEntity <DynamicBoneParticle> (true), }; var handle = job.Schedule(componentGroup.transformAccessArray, inputDeps); handle.Complete(); // becauce ofs the dependencies between DynamicBoneUpdateSystem and DynamicBoneApplyTransformSystem, not a good implementation return(handle); }
private static async Task RunHelpAsync(bool isHelp, string commandName, Dictionary <string, Func <IJobContext, Task> > pluginJobs) { if (isHelp || string.IsNullOrEmpty(commandName)) { var version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); await Console.Out.WriteLineAsync($"Cli 命令行版本: {version.Substring(0, version.Length - 2)}"); await Console.Out.WriteLineAsync($"当前文件夹: {CliUtils.PhysicalApplicationPath}"); await Console.Out.WriteLineAsync($"Cli 命令行文件夹: {Assembly.GetExecutingAssembly().Location}"); await Console.Out.WriteLineAsync(); await CliUtils.PrintRowLine(); await CliUtils.PrintRow("Usage"); await CliUtils.PrintRowLine(); var backupJob = new BackupJob(); var installJob = new InstallJob(); var restoreJob = new RestoreJob(); var syncJob = new SyncJob(); var updateJob = new UpdateJob(); var versionJob = new VersionJob(); backupJob.PrintUsage(); installJob.PrintUsage(); restoreJob.PrintUsage(); syncJob.PrintUsage(); updateJob.PrintUsage(); versionJob.PrintUsage(); if (pluginJobs != null && pluginJobs.Count > 0) { Console.WriteLine($"插件命令: {TranslateUtils.ObjectCollectionToString(pluginJobs.Keys)}"); Console.WriteLine(); } await CliUtils.PrintRowLine(); await CliUtils.PrintRow(CloudUtils.Root.DocsCliUrl); await CliUtils.PrintRowLine(); Console.ReadLine(); } else { Console.WriteLine($"'{commandName}' is not a siteserver command. See 'sitserver --help'"); } }
protected override JobHandle OnUpdate(JobHandle inputDeps) { var job = new UpdateJob() { time = Time.realtimeSinceStartup, chainRoot = componentGroup.chainRoot, chainDataArrayArray = componentGroup.chainDataArrayArray, }; var handle = job.Schedule(componentGroup.Length, 1); handle.Complete(); return(handle); }
protected override JobHandle OnUpdate(JobHandle inputDeps) { handle_ = inputDeps; var update_job = new UpdateJob { player_list_from_entity_ = player_list_from_entity_, cursor_list_ = group_.cursor_list_, rb_position_list_ = group_.rb_position_list_, }; handle_ = update_job.Schedule(group_.cursor_list_.Length, 8, handle_); return(handle_); }
private static void Jobs(OAuthAuthenticationStrategy auth) { var jobApiClient = new JobApiClient(auth, projectId); foreach (var job in jobApiClient.Get("ApiSample").items) { Console.WriteLine(job.jobName); } var jobRequest = new CreateJob(); jobRequest.jobName = "ApiSample_Job_" + Guid.NewGuid(); jobRequest.description = "test"; jobRequest.dueDate = "2018-11-21T11:51:17Z"; jobRequest.targetLocaleIds = new List <string>() { "ru-RU" }; jobRequest.callbackUrl = "https://www.callback.com/smartling/job"; jobRequest.callbackMethod = "GET"; jobRequest.referenceNumber = "test"; jobApiClient.Create(jobRequest); var jobs = jobApiClient.GetAll(); var processes = jobApiClient.GetProcesses(jobs.items.First().translationJobUid); var updateJob = new UpdateJob(); updateJob.jobName = jobRequest.jobName; updateJob.description = "test2"; updateJob.dueDate = "2018-11-21T11:51:17Z"; jobApiClient.Update(updateJob, jobs.items.First().translationJobUid); jobs = jobApiClient.GetAll(); jobApiClient.AddLocale("nl-NL", jobs.items.First().translationJobUid); var batchApiClient = new BatchApiClient(auth, projectId, String.Empty); var batch = batchApiClient.Create(new CreateBatch() { authorize = true, translationJobUid = jobs.items.First().translationJobUid }); string fileUri = "ApiSample_" + Guid.NewGuid(); batchApiClient.UploadFile(@"C:\Sample.xml", fileUri, "xml", "ru-RU", true, batch.batchUid); batchApiClient.Execute(batch.batchUid); var batchResult = batchApiClient.Get(batch.batchUid); }
private void StartJob(string fileUrl) { this.txtCurrentVersionNo.Text = this.currentVersionNo; job = manager.CreateJob(JOB_NAME, JOB_DESC, 0, 0); //job.AddFile(Ap.FilePatch, this.patchUrl); string localPath = Ap.FolderPatches + System.IO.Path.GetFileName(fileUrl); job.AddFile(localPath, fileUrl); job.Priority = UpdateJobPriority.Foreground; job.Resume(); jobEvents.AddJob(job); timer1.Interval = 3000; timer1.Start(); }
protected override void OnUpdate() { Attacks = AttackQuery.ToEntityArray(Allocator.TempJob); Dependency = new UpdateJob { Random = new Random((uint)UnityEngine.Random.Range(1, 10000)), Attacks = Attacks, AttackTargets = GetComponentDataFromEntity <Target>(true), AttackDamages = GetComponentDataFromEntity <Damage>(true), EquipmentLists = GetBufferFromEntity <EquipmentList>(true), CombatSize = GetComponentDataFromEntity <CombatSize>(true), EquipmentHealths = GetComponentDataFromEntity <Health>(false) }.Schedule(Dependency); }
protected override JobHandle OnUpdate(JobHandle inputDependencies) { var defaultSpecCube = ReflectionProbe.defaultTextureHDRDecodeValues; var defaultSpecCubeChanged = defaultSpecCube != m_LastSpecCube; var lastSystemVersion = LastSystemVersion; var jobHandle = new UpdateJob { SpecCube0Handle = GetComponentTypeHandle <BuiltinMaterialPropertyUnity_SpecCube0_HDR>(), DefaultSpecCube = defaultSpecCube, LastSystemVersion = lastSystemVersion, DefaultSpecCubeChanged = defaultSpecCubeChanged, } .ScheduleParallel(m_Query, inputDependencies); m_LastSpecCube = defaultSpecCube; return(jobHandle); }
public void Test_UpdateJobClass_GetCommandMethod_Returns_A_bool() { DbJob job = new DbJob(); job.JobId = 6; job.UserId = 6; job.Stream = "Testing"; job.Status = "Interviewing"; job.Company = "MyCompany"; job.Location = "Manchester"; job.Title = "updating From Tests"; job.Description = "I commit this change via NUnit"; job.Deadline = DateTime.Now; List<DbJob> jobList = new List<DbJob>(); jobList.Add(job); UpdateJob upjob = new UpdateJob(); bool result = upjob.GetCommand(jobList); Assert.IsInstanceOf(typeof(bool), result); }
public void Test_UpdateClass_GetCommandMethod_Returns_A_bool() { DbJob job = new DbJob(); job.JobId = 5; List<DbJob> jobs = new List<DbJob>(); jobs.Add(job); List<string> deleteskills = new List<string>(); deleteskills.Add(".Net"); List<string> Addedskills = new List<string>(); Addedskills.Add("SQL"); Addedskills.Add("Java"); Addedskills.Add("VMware"); UpdateJob upjob = new UpdateJob(); bool result = upjob.GetCommand(jobs, deleteskills); Assert.IsInstanceOf(typeof(bool), result); }
public bool UpdateAddedJobSkill(List<DbJob> jobs, List<string> newlyAddedSkills) { UpdateJob upJob = new UpdateJob(); return upJob.addNewSkills(jobs[0].JobId, newlyAddedSkills); }
public bool UpdateAMJob(List<DbJob> jobs) { UpdateJob upJob = new UpdateJob(); return upJob.GetCommand(jobs); }
public bool UpdateDeletedJobSkill(List<DbJob> jobs, List<string> deletedSkills) { UpdateJob upJob = new UpdateJob(); return upJob.GetCommand(jobs, deletedSkills); }
private UpdateJob QueueUpdate(UpdateJob job) { job.Finished += (sender, e) => { UpdateJob nextJob; _updateQueue.TryDequeue(out nextJob); if(_updateQueue.TryPeek(out nextJob)) { nextJob.Run(); } }; _updateQueue.Enqueue(job); if (_updateQueue.Count == 1) { job.Run(); } return job; }
public bool UpdateUserIdOfAJob(List<DbJob> jobs, int stream_id) { UpdateJob upJob = new UpdateJob(); return upJob.GetCommand(jobs, stream_id); }