app/soc/modules/ghop/tasks/task_update.py
changeset 2867 e8d86272e6ea
parent 2826 211783aa20d5
child 2871 e440e94a874b
equal deleted inserted replaced
2865:fee8732830f7 2867:e8d86272e6ea
    21     '"Madhusudan.C.S" <madhusudancs@gmail.com>'
    21     '"Madhusudan.C.S" <madhusudancs@gmail.com>'
    22   ]
    22   ]
    23 
    23 
    24 
    24 
    25 import logging
    25 import logging
    26 import os
       
    27 
    26 
    28 from google.appengine.api.labs import taskqueue
    27 from google.appengine.api.labs import taskqueue
    29 from google.appengine.ext import db
    28 from google.appengine.ext import db
    30 
    29 
    31 from django import http
    30 from django import http
    32 from django.utils.translation import ugettext
    31 from django.utils.translation import ugettext
    33 
    32 
       
    33 from soc.logic import system
    34 from soc.tasks.helper import error_handler
    34 from soc.tasks.helper import error_handler
    35 from soc.views.helper import redirects
    35 from soc.views.helper import redirects
    36 
    36 
    37 from soc.modules.ghop.logic.models import task as ghop_task_logic
    37 from soc.modules.ghop.logic.models import task as ghop_task_logic
    38 
    38 
   178 
   178 
   179   subscribers = db.get(ts_entity.subscribers[
   179   subscribers = db.get(ts_entity.subscribers[
   180       subscriber_start_index:subscriber_start_index+batch_size])
   180       subscriber_start_index:subscriber_start_index+batch_size])
   181 
   181 
   182   task_url = "http://%(host)s%(task)s" % {
   182   task_url = "http://%(host)s%(task)s" % {
   183                  'host': os.environ['HTTP_HOST'],
   183                  'host': system.getHostname(),
   184                  'task': redirects.getPublicRedirect(
   184                  'task': redirects.getPublicRedirect(
   185                      task_entity, {'url_name': 'ghop/task'}),
   185                      task_entity, {'url_name': 'ghop/task'}),
   186                  }
   186                  }
   187 
   187 
   188   # create the data for the mail to be sent
   188   # create the data for the mail to be sent