62 |
62 |
63 params = dicts.merge(params, new_params) |
63 params = dicts.merge(params, new_params) |
64 |
64 |
65 super(View, self).__init__(params=params) |
65 super(View, self).__init__(params=params) |
66 |
66 |
67 def add(self, request, access_type, page_name): |
67 def poke(self, request, access_type, page_name): |
68 group = priority_group_logic.getGroup(priority_group_logic.EMAIL) |
68 """View called by the cron system that handles jobs. |
69 |
69 |
70 fields = { |
70 Args: |
71 'priority_group': group, |
71 request: the standard Django HTTP request object |
72 'task_name': 'sendAcceptanceEmail', |
72 access_type : the name of the access type which should be checked |
73 'text_data': "O HI THAR", |
73 page_name: the page name displayed in templates as page and header title |
74 } |
|
75 |
|
76 job_logic.updateOrCreateFromFields(fields) |
|
77 |
|
78 return http.HttpResponse("Done") |
|
79 |
|
80 def poke(self, request, access_type, page_name): |
|
81 """ |
|
82 """ |
74 """ |
83 |
75 |
84 order = ['-priority'] |
76 order = ['-priority'] |
85 query = priority_group_logic.getQueryForFields(order=order) |
77 query = priority_group_logic.getQueryForFields(order=order) |
86 groups = priority_group_logic.getAll(query) |
78 groups = priority_group_logic.getAll(query) |