stopStudy method

  1. @mustCallSuper
Future<void> stopStudy(
  1. Study study
)
inherited

Permanently stop collecting data for study and mark it as stopped.

Once a study is stopped it cannot be deployed anymore since it will be marked as permanently stopped in the DeploymentService.

If you only want to remove the study from this client and be able to redeploy it later, use the removeStudy method instead.

Implementation

@mustCallSuper
Future<void> stopStudy(Study study) async {
  var runtime = repository[study];

  if (runtime != null) {
    await runtime.stop();
    await removeStudy(study);

    // Permanently stop this study deployment on the deployment service.
    await deploymentService?.stop(study.studyDeploymentId);
  }
}