소스 검색

delay_task now returns string id, not UUID object.

Ask Solem 16 년 전
부모
커밋
da7a3f4ee0
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      celery/messaging.py

+ 2 - 2
celery/messaging.py

@@ -14,10 +14,10 @@ class TaskPublisher(Publisher):
     routing_key = "celery"
 
     def delay_task(self, task_name, **kwargs):
-        task_id = uuid.uuid4()
+        task_id = str(uuid.uuid4())
         message_data = dict(kwargs)
         message_data["celeryTASK"] = task_name
-        message_data["celeryID"] = str(task_id)
+        message_data["celeryID"] = task_id
         self.send(message_data)
         return task_id