コード例 #1
0
    def handle(self, *args, **options):

        try:
            self.update_all_scores()

        except Exception as e:
            error_handler.handle(self, e)
コード例 #2
0
    def handle(self, *args, **options):

        try:
            logger.info('Fetching Tremonia Series data...')
            tremonia_series.update_tournaments()
            logger.info('Tremonia Series data has been updated')

        except Exception as e:
            error_handler.handle(self, e)
コード例 #3
0
    def handle(self, *args, **options):

        try:
            logger.info('Fetching German Tour data...')
            german_tour.update_tournaments()
            logger.info('German Tour data has been updated')

        except Exception as e:
            error_handler.handle(self, e)
コード例 #4
0
    def handle_friend(self, pdga_api, friend):

        try:

            pdga_api.update_friend_rating(friend)
            pdga_api.update_friend_tournament_statistics(friend)
            pdga.update_friend_tournaments(friend, pdga_api)

        except Exception as e:
            logger.error(f'Exception updating PDGA data for friend: {friend}')
            error_handler.handle(self, e, friend)
コード例 #5
0
    def handle(self, *args, **options):

        try:

            logger.info('Fetching PDGA data...')
            pdga_api = PdgaApi()

            for friend in Friend.objects.all():
                self.handle_friend(pdga_api, friend)

            pdga_api.logout()
            logger.info('PDGA data has been updated')

        except Exception as e:
            error_handler.handle(self, e)