def handle(self, *args, **options):
     filter_kwargs = {'severity': 'permanent'}
     if options['include_temporary']:
         filter_kwargs['severity'] += ' OR temporary'
     events = get_events(options['begin_time'], options['end_time'],
                         EVENTS_OF_INTEREST, **filter_kwargs)
     self.process_events(events, options['output_file'])
 def handle(self, *args, **options):
     filter_kwargs = {'severity': 'permanent'}
     if options['include_temporary']:
         filter_kwargs['severity'] += ' OR temporary'
     events = get_events(options['begin_time'], options['end_time'],
                         EVENTS_OF_INTEREST, **filter_kwargs)
     self.process_events(events, options['output_file'])
 def handle(self, *args, **options):
     end = datetime.datetime.now(tz=pytz.utc)
     begin = end - datetime.timedelta(days=options['days_back'])
     logger.info('Pulling {} days of events for {}'.format(
                     options['days_back'], settings.LISTSERV_DOMAIN))
     try:
         events = get_events(begin, end, EVENTS_OF_INTEREST)
     except RuntimeError as e:
         raise CommandError(unicode(e))
     logger.debug('Done pulling events')
     self.process_events(events)
 def handle(self, *args, **options):
     end = datetime.datetime.now(tz=pytz.utc)
     begin = end - datetime.timedelta(days=options['days_back'])
     logger.info('Pulling {} days of events for {}'.format(
         options['days_back'], settings.LISTSERV_DOMAIN))
     try:
         events = get_events(begin, end, EVENTS_OF_INTEREST)
     except RuntimeError as e:
         raise CommandError(str(e))
     logger.debug('Done pulling events')
     self.process_events(events)
예제 #5
0
 def handle(self, *args, **options):
     events = get_events(options['begin_time'], options['end_time'],
                         EVENTS_OF_INTEREST)
     self.process_events(events, options['output_file'])
 def handle(self, *args, **options):
     events = get_events(options['begin_time'], options['end_time'],
                         EVENTS_OF_INTEREST)
     self.process_events(events, options['output_file'])