コード例 #1
0
        public async Task <IActionResult> CreateTrigger([Required] int jobId, CancellationToken cancellationToken)
        {
            var jobSetting =
                await _jobStoreContext.JobSettings.FirstOrDefaultAsync(i => i.Id == jobId,
                                                                       cancellationToken);

            if (jobSetting == null)
            {
                return(Ok(new { code = 1, message = $"Not found job setting by id {jobId.ToString()}" }));
            }

            await _coreService.CreateJobTrigger(jobSetting, cancellationToken);

            return(Ok(new { code = 0, message = "ok" }));
        }