feedmapper/models.py
def save(self, *args, **kwargs):
            "Create or update a django-celery periodic task for this mapping."
            super(Mapping, self).save(*args, **kwargs)
            from djcelery.models import CrontabSchedule, PeriodicTask
            crontab, created = CrontabSchedule.objects.get_or_create(minute='0', hour='*', day_of_week='*')
            task = 'feedmapper.tasks.feedmapper_sync'
            args = '[%s]' % self.id
            task, created = PeriodicTask.objects.get_or_create(task=task, args=args)
            task.name = self.label
            if not (task.interval or task.crontab):
                task.crontab = crontab
            task.save()
Create or update a django-celery periodic task for this mapping.
Create or update a django-celery periodic task for this mapping.
Create or update a django - celery periodic task for this mapping .
def save(self, *args, **kwargs):
            super(Mapping, self).save(*args, **kwargs)
            from djcelery.models import CrontabSchedule, PeriodicTask
            crontab, created = CrontabSchedule.objects.get_or_create(minute='0', hour='*', day_of_week='*')
            task = 'feedmapper.tasks.feedmapper_sync'
            args = '[%s]' % self.id
            task, created = PeriodicTask.objects.get_or_create(task=task, args=args)
            task.name = self.label
            if not (task.interval or task.crontab):
                task.crontab = crontab
            task.save()
def save ( self , * args , ** kwargs ) : super ( Mapping , self ) . save ( * args , ** kwargs ) from djcelery . models import CrontabSchedule , PeriodicTask crontab , created = CrontabSchedule . objects . get_or_create ( minute = '0' , hour = '*' , day_of_week = '*' ) task = 'feedmapper.tasks.feedmapper_sync' args = '[%s]' % self . id task , created = PeriodicTask . objects . get_or_create ( task = task , args = args ) task . name = self . label if not ( task . interval or task . crontab ) : task . crontab = crontab task . save ( )
Create or update a django-celery periodic task for this mapping.
Create or update a django - celery periodic task for this mapping .
"Create or update a django-celery periodic task for this mapping."
self