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()
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()
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()
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()
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()
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()