Ejemplo n.º 1
0
 def clear_cache(self, request, *args, **kwargs):
     clear_cache_task.apply_async(
         link=send_slack_message.s(self.response_url,
                                   {'text': 'Cache successfully cleared!'}),
         link_error=send_slack_message.s(self.response_url,
                                         {'text': 'Error clearing cache.'}))
     return HttpResponse()
Ejemplo n.º 2
0
 def update_performance_scores(self, request, *args, **kwargs):
     for department in self.command_args:
         update_performance_score.apply_async(
             (department, ),
             link=send_slack_message.s(
                 self.response_url, {
                     'text':
                     'Performance score updated for department: {}'.format(
                         department)
                 }),
             link_error=send_slack_message.s(
                 self.response_url, {
                     'text':
                     'Error updating performance score for department: {}'.
                     format(department)
                 }))
     return HttpResponse()
Ejemplo n.º 3
0
 def update_nfirs_counts(self, request, *args, **kwargs):
     for department in self.command_args:
         update_nfirs_counts.apply_async(
             (department, ),
             link=send_slack_message.s(
                 self.response_url, {
                     'text':
                     'NFIRS counts updated for department: {}'.format(
                         department)
                 }),
             link_error=send_slack_message.s(
                 self.response_url, {
                     'text':
                     'Error updating NFIRS counts for department: {}'.
                     format(department)
                 }))
     return HttpResponse()
Ejemplo n.º 4
0
 def update_performance_scores(self, request, *args, **kwargs):
     for department in self.command_args:
         update_performance_score.apply_async((department,),
                                     link=send_slack_message.s(self.response_url, {'text': 'Performance score updated for department: {}'.format(department)}),
                                     link_error=send_slack_message.s(self.response_url, {'text': 'Error updating performance score for department: {}'.format(department)}))
     return HttpResponse()
Ejemplo n.º 5
0
 def update_nfirs_counts(self, request, *args, **kwargs):
     for department in self.command_args:
         update_nfirs_counts.apply_async((department,),
                                     link=send_slack_message.s(self.response_url, {'text': 'NFIRS counts updated for department: {}'.format(department)}),
                                     link_error=send_slack_message.s(self.response_url, {'text': 'Error updating NFIRS counts for department: {}'.format(department)}))
     return HttpResponse()
Ejemplo n.º 6
0
 def clear_cache(self, request, *args, **kwargs):
     clear_cache_task.apply_async(link=send_slack_message.s(self.response_url, {'text': 'Cache successfully cleared!'}),
                                  link_error=send_slack_message.s(self.response_url, {'text': 'Error clearing cache.'}))
     return HttpResponse()