equal
deleted
inserted
replaced
26 import logging |
26 import logging |
27 |
27 |
28 from google.appengine.ext import db |
28 from google.appengine.ext import db |
29 from google.appengine.runtime import DeadlineExceededError |
29 from google.appengine.runtime import DeadlineExceededError |
30 |
30 |
|
31 from soc.cron import student_proposal_mailer |
31 from soc.models.job import Job |
32 from soc.models.job import Job |
32 |
|
33 |
33 |
34 class Error(Exception): |
34 class Error(Exception): |
35 """Base class for all exceptions raised by this module. |
35 """Base class for all exceptions raised by this module. |
36 """ |
36 """ |
37 pass |
37 pass |
55 def __init__(self): |
55 def __init__(self): |
56 """Constructs a new Handler with all known jobs set. |
56 """Constructs a new Handler with all known jobs set. |
57 """ |
57 """ |
58 |
58 |
59 self.tasks = {} |
59 self.tasks = {} |
60 self.tasks['sendAcceptanceEmail'] = logging.info |
60 self.tasks['setupStudentProposalMailing'] = \ |
|
61 student_proposal_mailer.setupStudentProposalMailing |
|
62 self.tasks['sendStudentProposalMail'] = \ |
|
63 student_proposal_mailer.sendStudentProposalMail |
61 |
64 |
62 def claimJob(self, job_key): |
65 def claimJob(self, job_key): |
63 """A transaction to claim a job. |
66 """A transaction to claim a job. |
64 """ |
67 """ |
65 |
68 |