¼¿·¯¸® - ŽºÅ© Æ®¸® ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- NetAngels team
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- https://github.com/NetAngels/
¼¿·¯¸® - ŽºÅ© Æ®¸® ű×
¼¿·¯¸® - ŽºÅ© Æ®¸® ¼³¸í
¼¿·¯¸® Tasktree ¸ðµâ Celery-TaskTree´Â ƯÁ¤ ¼ø¼·Î ¼¿·¯¸® ÀÛ¾÷ÀÇ Æ®¸®¸¦ ºñµ¿±â ÀûÀ¸·Î ½ÇÇàÇÏ´Â µ¥ µµ¿òÀ̵Ǵ ÆÄÀ̽㠸ðµâÀÔ´Ï´Ù. TaskTree´Â ¸¹Àº ÀÛ¾÷°ú Á¾¼Ó¼ºÀÌ Ä¿Áö°í ¼øÁøÇÑ ÄÝ¹é ±â¹Ý Á¢±Ù ¹æ½ÄÀÌ ÀÌÇØÇϱ⠾î·Á¿ï ¶§ Rescue¿¡ ¿Â´Ù. »ùÇà : TaskTree °¡Á® ¿À±â task_with_callbacks, TaskTree @ task_with_callbacksdef some_action (...) : ... def execute_actions () : tree = tasktree () task0 = tree.add_task (some_action, args = , kwargs = {...}) task1 = tree.add_task (some_action, args = , kwargs = {...}) task10 = task1.add_task (some_action, args = , kwargs = {...}) task11 = task1.add_task (some_action, args = , kwargs = {. } task110 = task11.add_task (some_action, args = , kwargs = {...}) Async_Result = tree.Apply_Async () ¹Ýȯ async_resultdecorerator´Â °£´ÜÇÑ ¼¿·¯¸® ÀÛ¾÷ decorator ´ë½Å task_with_callbacks¸¦ »ç¿ëÇؾßÇÕ´Ï´Ù. According ÄÚµå·Î : - Task0 ¹× Task1Àº Task1- Task110ÀÌ ÁÖ¸ñ ÇÒ ¶§ Task1-Task110ÀÌ ½ÇÇà µÈ ÈÄ µ¿½Ã¿¡ ½ÇÇàµË´Ï´Ù. - ½ÇÇà ¹× ThÀÇ ÀüÆĸ¦ ÁßÁö ÇÒ ¼öÀÖ´Â ¹æ¹ýÀÌ ¾ø½À´Ï´Ù. Á¶»ó¿¡¼ ÀÚ½Ä ÀÛ¾÷À¸·Î Ãß°¡ Àμö¸¦ Àü´ÞÇÒ ¼öÀÖ´Â ¹æ¹ýÀÌ ¾Æ´Õ´Ï´Ù. °£´ÜÈ÷ ¸»Çϸé, ½ÇÇà ¼ø¼ÀÇ Á¾¼Ó¼ºÀÌ ÇϳªÀÇ Á¾·ù¿¡ ºÒ°úÇÕ´Ï´Ù .- ½ÇÇà ¼ø¼ÀÇ Á¾¼Ó¼º .- subtask (ÇÔ¼ö) ¸®ÅÏ °ªÀÌ °´Ã¼ ÀÎ °æ¿ì "async_result"¶ó´Â ¼Ó¼ºÀÌ ÇØ´ç °´Ã¼¿¡ Ãß°¡ µÉ ¼ö ÀÖ½À´Ï´Ù. ()¿¡ ÇÕ·ùÇϽʽÿÀ. ÀÌÀü ¿¹Á¦¸¦ È®ÀåÇÏ·Á¸é ´ÙÀ½À» ¼öÇàÇϽʽÿÀ. async_result = execute_actions () task0_result, task1_result = async_result.join () task121_result.async_result.join () task110_result = task11_result.async_result.join () ¿ä±¸ »çÇ× : ¡¤ ÆÄÀ̽ã
¼¿·¯¸® - ŽºÅ© Æ®¸® °ü·Ã ¼ÒÇÁÆ®¿þ¾î