예제 #1
0
def start_expanding_recurring_events(request):
    try:
        for ns in namespace_registry.all():
            set_namespace(ns.ns)
            taskqueue.add(url='/events/expand_recurring_events/')

    except Exception, e:
        logging.error("%s in \n%s" %
                      (traceback.format_exc(), str(request.POST)))
예제 #2
0
def start_expanding_recurring_events(request):
    try:
        for ns in namespace_registry.all():
            set_namespace(ns.ns)
            taskqueue.add(url='/events/expand_recurring_events/')
        

    except Exception,e:
                logging.error("%s in \n%s"% (traceback.format_exc(),str(request.POST)))        
예제 #3
0
def start_fetch_icals(request):

    for ns in namespace_registry.all():
        set_namespace(ns.ns)
        logging.warning('namespace: %s'% get_namespace())
        taskqueue.add(url='/sources/fetch/', params={
                                                'started': datetime.now(),
                                                'timestamp': datetime.now().strftime("%Y%m%d%H%M")})
        #logging.warning("started fetch queuing at %s" % datetime.now())
    return HttpResponse("enqueued!")
예제 #4
0
def start_schedule_newsletters(request):
    try:
        for ns in namespace_registry.all():
            set_namespace(ns.ns)
            for site in Eventsite.all().filter('offline =', False):
                taskqueue.add(url='/subscriptions/schedule_next_newsletter/',
                              params={'site': str(site.key())})
    except Exception, e:
        logging.error("%s in \n%s" %
                      (traceback.format_exc(), str(request.POST)))
예제 #5
0
def start_schedule_newsletters(request):
    try:
        for ns in namespace_registry.all():
            set_namespace(ns.ns)
            for site in Eventsite.all().filter('offline =', False):
                taskqueue.add(url='/subscriptions/schedule_next_newsletter/',
                       params={'site': str(site.key())}
                      )
    except Exception,e:
          logging.error("%s in \n%s"% (traceback.format_exc(),str(request.POST)))
예제 #6
0
def start_fetch_icals(request):

    for ns in namespace_registry.all():
        set_namespace(ns.ns)
        logging.warning('namespace: %s' % get_namespace())
        taskqueue.add(url='/sources/fetch/',
                      params={
                          'started': datetime.now(),
                          'timestamp': datetime.now().strftime("%Y%m%d%H%M")
                      })
        #logging.warning("started fetch queuing at %s" % datetime.now())
    return HttpResponse("enqueued!")