Esempio n. 1
0
    def run(self):

        if self.action == 'update_schedule':
            result = schedule.fetch_from_api(range_start=DEFAULT_RANGE, range_end=DEFAULT_RANGE)
            print 'num items processed: %s' % len(result)

        if self.action == 'reset_schedule':
            result = ScheduledItem.objects.all().delete()
Esempio n. 2
0
 def update_schedule(self, *args, **options):
     result = schedule.fetch_from_api(range_start=DEFAULT_RANGE, range_end=DEFAULT_RANGE)
     self.stdout.write("Processed {0} items".format(len(result)))
Esempio n. 3
0
def update_schedule(range_start=3600, range_end=3600):
    log.info('updating schedule: %s to %s' % (range_start, range_end))
    result = schedule.fetch_from_api(range_start=range_start, range_end=range_end)