Example #1
0
 def _handle_csv(self, file, cohort: Cohort) -> None:
     decoded_file = file.read().decode("utf-8").splitlines()
     reader = csv.reader(decoded_file)
     distinct_ids_and_emails = [
         row[0] for row in reader if len(row) > 0 and row
     ]
     calculate_cohort_from_list.delay(cohort.pk, distinct_ids_and_emails)
Example #2
0
 def _calculate_static_by_people(self, people: List[str],
                                 cohort: Cohort) -> None:
     calculate_cohort_from_list.delay(cohort.pk, people)