当前位置: 首页>>代码示例>>Python>>正文


Python Scheduler.reserve方法代码示例

本文整理汇总了Python中celery.beat.Scheduler.reserve方法的典型用法代码示例。如果您正苦于以下问题:Python Scheduler.reserve方法的具体用法?Python Scheduler.reserve怎么用?Python Scheduler.reserve使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在celery.beat.Scheduler的用法示例。


在下文中一共展示了Scheduler.reserve方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: reserve

# 需要导入模块: from celery.beat import Scheduler [as 别名]
# 或者: from celery.beat.Scheduler import reserve [as 别名]
 def reserve(self, entry):
     new_entry = Scheduler.reserve(self, entry)
     # Need to story entry by name, because the entry may change
     # in the mean time.
     self._dirty.add(new_entry.name)
     if self.should_flush():
         self.logger.debug("Celerybeat: Writing schedule changes...")
         self.flush()
     return new_entry
开发者ID:crankycoder,项目名称:zamboni-lib,代码行数:11,代码来源:schedulers.py

示例2: reserve

# 需要导入模块: from celery.beat import Scheduler [as 别名]
# 或者: from celery.beat.Scheduler import reserve [as 别名]
 def reserve(self, entry):
     """
     This is called when a new instance of a task is scheduled to run. Hook
     in here so we can avoid saving updates to tasks that have none.
     """
     new_entry = Scheduler.reserve(self, entry)
     # Add to a list of what has changed. Store by name since the entry
     # itself may be a different instance by the time we get to it.
     self._dirty.add(new_entry.name)
     return new_entry
开发者ID:asanchez-zenoss-2,项目名称:serviced,代码行数:12,代码来源:cpcelery.py

示例3: reserve

# 需要导入模块: from celery.beat import Scheduler [as 别名]
# 或者: from celery.beat.Scheduler import reserve [as 别名]
 def reserve(self, entry):
     new_entry = Scheduler.reserve(self, entry)
     # Need to store entry by name, because the entry may change
     # in the mean time.
     self._dirty.add(new_entry.name)
     return new_entry
开发者ID:alex-hh,项目名称:django-celery,代码行数:8,代码来源:schedulers.py

示例4: reserve

# 需要导入模块: from celery.beat import Scheduler [as 别名]
# 或者: from celery.beat.Scheduler import reserve [as 别名]
 def reserve(self, entry):
     new_entry = Scheduler.reserve(self, entry)
     return new_entry
开发者ID:jfilak,项目名称:faf,代码行数:5,代码来源:schedulers.py


注:本文中的celery.beat.Scheduler.reserve方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。