public async Task <IActionResult> StartProjectJob([FromServices] IJProjectsRepository projectsRepository, CancellationToken ct) { await Task.Run(() => { BackgroundJob.Enqueue(() => projectsRepository.SyncProjects(ct)); }, ct); return(Ok()); }
public ProjectsController(ILogger <ProjectsController> logger, IJProjectsRepository projectsRepository) { _logger = logger; _projectsRepository = projectsRepository; }