1. <small id='Qk8oi'></small><noframes id='Qk8oi'>

      <bdo id='Qk8oi'></bdo><ul id='Qk8oi'></ul>
  2. <tfoot id='Qk8oi'></tfoot>
  3. <i id='Qk8oi'><tr id='Qk8oi'><dt id='Qk8oi'><q id='Qk8oi'><span id='Qk8oi'><b id='Qk8oi'><form id='Qk8oi'><ins id='Qk8oi'></ins><ul id='Qk8oi'></ul><sub id='Qk8oi'></sub></form><legend id='Qk8oi'></legend><bdo id='Qk8oi'><pre id='Qk8oi'><center id='Qk8oi'></center></pre></bdo></b><th id='Qk8oi'></th></span></q></dt></tr></i><div id='Qk8oi'><tfoot id='Qk8oi'></tfoot><dl id='Qk8oi'><fieldset id='Qk8oi'></fieldset></dl></div>
    1. <legend id='Qk8oi'><style id='Qk8oi'><dir id='Qk8oi'><q id='Qk8oi'></q></dir></style></legend>

      芹菜,叫延时倒计时

      Celery, calling delay with countdown(芹菜,叫延时倒计时)

          <legend id='r3fLS'><style id='r3fLS'><dir id='r3fLS'><q id='r3fLS'></q></dir></style></legend>
            • <bdo id='r3fLS'></bdo><ul id='r3fLS'></ul>

                <tfoot id='r3fLS'></tfoot>

                <small id='r3fLS'></small><noframes id='r3fLS'>

                  <tbody id='r3fLS'></tbody>

                <i id='r3fLS'><tr id='r3fLS'><dt id='r3fLS'><q id='r3fLS'><span id='r3fLS'><b id='r3fLS'><form id='r3fLS'><ins id='r3fLS'></ins><ul id='r3fLS'></ul><sub id='r3fLS'></sub></form><legend id='r3fLS'></legend><bdo id='r3fLS'><pre id='r3fLS'><center id='r3fLS'></center></pre></bdo></b><th id='r3fLS'></th></span></q></dt></tr></i><div id='r3fLS'><tfoot id='r3fLS'></tfoot><dl id='r3fLS'><fieldset id='r3fLS'></fieldset></dl></div>
                本文介绍了芹菜,叫延时倒计时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在尝试了解芹菜是如何工作的

                tasks.py文件中的Django应用程序中,我创建了一个任务:

                @celery.shared_task(default_retry_delay=2 * 60, max_retries=2)
                def my_task(param1, param2):
                    # There are some operations
                

                我使用以下代码调用此任务:

                my_task.delay(param1, param2)
                

                my_task中有一种情况需要重新启动此任务,但延迟一分钟后

                我发现有一些任务的ETA and countdown,但它们的示例只有apply_async

                是否可以对delay使用某种倒计时?

                推荐答案

                发件人basic part of celery Calling documentation

                delay(*args, **kwargs)
                
                发送任务消息的快捷方式,但不支持执行 选项。

                因此延迟显然很方便,但是如果您想要设置其他 您必须使用的执行选项Apply_Async

                AS文档声明delay不能在设置其他选项的情况下使用,因此您只需将您的呼叫转换为apply_async

                如果要添加执行选项,文档建议您使用签名。例如:

                my_task.s(arg1, arg2).apply_async(countdown=60)
                

                这篇关于芹菜,叫延时倒计时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                groupby multiple coords along a single dimension in xarray(在xarray中按单个维度的多个坐标分组)
                Group by and Sum in Pandas without losing columns(Pandas中的GROUP BY AND SUM不丢失列)
                Group by + New Column + Grab value former row based on conditionals(GROUP BY+新列+基于条件的前一行抓取值)
                Groupby and interpolate in Pandas(PANDA中的Groupby算法和插值算法)
                Pandas - Group Rows based on a column and replace NaN with non-null values(PANAS-基于列对行进行分组,并将NaN替换为非空值)
                Grouping pandas DataFrame by 10 minute intervals(按10分钟间隔对 pandas 数据帧进行分组)
              1. <i id='mhT3P'><tr id='mhT3P'><dt id='mhT3P'><q id='mhT3P'><span id='mhT3P'><b id='mhT3P'><form id='mhT3P'><ins id='mhT3P'></ins><ul id='mhT3P'></ul><sub id='mhT3P'></sub></form><legend id='mhT3P'></legend><bdo id='mhT3P'><pre id='mhT3P'><center id='mhT3P'></center></pre></bdo></b><th id='mhT3P'></th></span></q></dt></tr></i><div id='mhT3P'><tfoot id='mhT3P'></tfoot><dl id='mhT3P'><fieldset id='mhT3P'></fieldset></dl></div>
                  <legend id='mhT3P'><style id='mhT3P'><dir id='mhT3P'><q id='mhT3P'></q></dir></style></legend>

                          <tbody id='mhT3P'></tbody>
                        <tfoot id='mhT3P'></tfoot>
                        • <bdo id='mhT3P'></bdo><ul id='mhT3P'></ul>

                          <small id='mhT3P'></small><noframes id='mhT3P'>