def process_chunk(self, start, end, chunk):
        """Called when chunk of data should be processed.
        Removes existing records if such option was provided and re-populates
        the aggregates.

        """
        if self.clear_existing and self.chunk_delete:
            self.clear_past_results(start, end)
        self.call_command_verbose('db_refresh_mviews', **{'force': True,
            'start': start, 'end': end, 'clear-existing': False})
        self.call_command_verbose('db_update_agregates', **{'start': start,
            'end': end, 'clear-existing': False})
        return True
dataset/ETHPy150Open ipeirotis/Mturk-Tracker/app/mturk/updaters/management/commands/recalculate_aggregates.py/Command.process_chunk/original