Beispiel #1
0
def main():
    for updater in updaters:
        try:
            updater.run()
        except Exception as e:
            tb = traceback.format_exc()
            send_error(
                channel="corona-data-updates",
                title=f"Updating Grapher dataset: {updater.dataset_name}",
                trace=tb,
            )
Beispiel #2
0
 def run(self):
     try:
         import_dataset(
             dataset_name=self.dataset_name,
             namespace=self.namespace,
             csv_path=self.input_csv_path,
             default_variable_display={
                 'yearIsDay': self.year_is_day,
                 'zeroDay': self.zero_day
             },
             source_name=self.source_name,
             slack_notifications=self.slack_notifications,
             unit=self.unit,
             unit_short=self.unit_short,
         )
     except Exception as e:
         tb = traceback.format_exc()
         send_error(
             channel="corona-data-updates",
             title=f'Updating Grapher dataset: {self.dataset_name}',
             trace=tb,
         )