Esempio n. 1
0
 def download_from_drive():
     google_client = DriveClient()
     csv_filename = google_client.download_latest_csv()
     new_customers = self.load_csv(csv_filename)
     #drop customer table and replace the customers with the downloaded customers
     if new_customers:
         self.customers = []
         self.drop_customers()
         self.enable_databases()
         for c in new_customers:
             self.create_new_account(c)
     
     App.get_running_app().man.get_screen("acc_manage").on_pre_enter()
     InformationPopup('File downloaded')
     Logger.info('CustomerHandler: download thread finished')
Esempio n. 2
0
 def download_from_drive():
     google_client = DriveClient()
     csv_filename = google_client.download_latest_csv(full_path = self.full_path)
     new_customers = self.load_csv(csv_filename)
     #drop customer table and replace the customers with the downloaded customers
     if new_customers:
         self.customers = []
         self.drop_customers()
         self.enable_databases()
         for c in new_customers:
             self.create_existing_account(c)
     
     App.get_running_app().man.get_screen("acc_manage").on_pre_enter()
     InformationPopup('File downloaded')
     Logger.info('CustomerHandler: download thread finished')