Exemplo n.º 1
0
    public async Task <int> RunTwinJobAsync()
    {
        var jobId = StartTwinUpdateJob(_opts);

        //  TODO:
        await JobMonitor.MonitorAsync(_appsettings, jobId);

        return(0);
    }
Exemplo n.º 2
0
    public async Task <int> RunDirectMethodAsync()
    {
        var  jobId   = Guid.NewGuid().ToString();
        Task jobTask = Task.Run(() => StartMethodJob(jobId));

        Task monitorTask = Task.Run(() => JobMonitor.MonitorAsync(_appsettings, jobId));

        Task.WaitAll(jobTask, monitorTask);
        return(0);
    }