소스 검색

Now basic_reject's invalid messages

Ask Solem 13 년 전
부모
커밋
fc0fc1f638
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      celery/worker/consumer.py

+ 3 - 3
celery/worker/consumer.py

@@ -435,7 +435,7 @@ class Consumer(object):
                 "Received and deleted unknown message. Wrong destination?!? \
                 the full contents of the message body was: %s" % (
                  self._message_report(body, message), )))
-            message.ack_log_error(self.logger, self.connection_errors)
+            message.reject_log_error(self.logger, self.connection_errors)
             return
 
         try:
@@ -443,11 +443,11 @@ class Consumer(object):
         except KeyError, exc:
             self.logger.error(UNKNOWN_TASK_ERROR, exc, safe_repr(body),
                               exc_info=True)
-            message.ack_log_error(self.logger, self.connection_errors)
+            message.reject_log_error(self.logger, self.connection_errors)
         except InvalidTaskError, exc:
             self.logger.error(INVALID_TASK_ERROR, str(exc), safe_repr(body),
                               exc_info=True)
-            message.ack_log_error(self.logger, self.connection_errors)
+            message.reject_log_error(self.logger, self.connection_errors)
 
     def maybe_conn_error(self, fun):
         """Applies function but ignores any connection or channel