# HG changeset patch # User Sverre Rabbelier # Date 1240064730 0 # Node ID c0f52da7a808422d73430cf9913a71613714a174 # Parent 4095892a3c999d801ebb6780c94d42f2a05fa854 Remove testing method and update docstring for cron system Patch by: Sverre Rabbelier diff -r 4095892a3c99 -r c0f52da7a808 app/soc/cron/job.py --- a/app/soc/cron/job.py Sat Apr 18 14:04:39 2009 +0000 +++ b/app/soc/cron/job.py Sat Apr 18 14:25:30 2009 +0000 @@ -110,6 +110,8 @@ def handle(self, job_key): """Handle one job. + + Returns: whether another job should be started after this one """ try: diff -r 4095892a3c99 -r c0f52da7a808 app/soc/views/models/cron.py --- a/app/soc/views/models/cron.py Sat Apr 18 14:04:39 2009 +0000 +++ b/app/soc/views/models/cron.py Sat Apr 18 14:25:30 2009 +0000 @@ -64,21 +64,13 @@ super(View, self).__init__(params=params) - def add(self, request, access_type, page_name): - group = priority_group_logic.getGroup(priority_group_logic.EMAIL) + def poke(self, request, access_type, page_name): + """View called by the cron system that handles jobs. - fields = { - 'priority_group': group, - 'task_name': 'sendAcceptanceEmail', - 'text_data': "O HI THAR", - } - - job_logic.updateOrCreateFromFields(fields) - - return http.HttpResponse("Done") - - def poke(self, request, access_type, page_name): - """ + Args: + request: the standard Django HTTP request object + access_type : the name of the access type which should be checked + page_name: the page name displayed in templates as page and header title """ order = ['-priority'] @@ -117,5 +109,4 @@ view = View() -add = view.add poke = view.poke