public async Task <IActionResult> StartProjectJob([FromServices] IJProjectsRepository projectsRepository,
                                                          CancellationToken ct)
        {
            await Task.Run(() => { BackgroundJob.Enqueue(() => projectsRepository.SyncProjects(ct)); }, ct);

            return(Ok());
        }
Пример #2
0
 public ProjectsController(ILogger <ProjectsController> logger, IJProjectsRepository projectsRepository)
 {
     _logger             = logger;
     _projectsRepository = projectsRepository;
 }