コード例 #1
0
 public async Task <IActionResult> StartMeasurement([FromBody] InputParams inputParams)
 {
     if (inputParams.Frequency == 0)
     {
         await _service.MeasureRequestAsync(inputParams.Url);
     }
     else
     {
         BackgroundJob.Enqueue(() => _service.StartMeasurementLoop(inputParams.Url, inputParams.Frequency));
     }
     return(Ok());
 }