stopStudy method

  1. @mustCallSuper
Future<void> stopStudy(
  1. String studyDeploymentId
)
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(String studyDeploymentId) async {
  var runtime = repository[studyDeploymentId];

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

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