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


Python JobItem.waitWorkDone方法代码示例

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


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

示例1: action_schedulingdone

# 需要导入模块: from twext.enterprise.jobs.jobitem import JobItem [as 别名]
# 或者: from twext.enterprise.jobs.jobitem.JobItem import waitWorkDone [as 别名]
    def action_schedulingdone(self, j):
        """
        Wait for all schedule queue items to complete.
        """
        yield JobItem.waitWorkDone(self._store.newTransaction, reactor, 120.0, (
            ScheduleOrganizerWork, ScheduleOrganizerSendWork, ScheduleReplyWork, ScheduleRefreshWork, ScheduleAutoReplyWork,
        ))

        returnValue(self._ok("ok", "Scheduling done"))
开发者ID:eventable,项目名称:CalendarServer,代码行数:11,代码来源:controlapi.py

示例2: action_refreshgroups

# 需要导入模块: from twext.enterprise.jobs.jobitem import JobItem [as 别名]
# 或者: from twext.enterprise.jobs.jobitem.JobItem import waitWorkDone [as 别名]
    def action_refreshgroups(self, j):
        txn = self._store.newTransaction()
        yield txn.directoryService().flush()
        work = yield GroupCacherPollingWork.reschedule(txn, 0, force=True)
        jobID = work.jobID
        yield txn.commit()

        if "wait" in j and j["wait"]:
            yield JobItem.waitJobDone(self._store.newTransaction, reactor, 60.0, jobID)
            yield JobItem.waitWorkDone(self._store.newTransaction, reactor, 60.0, (
                GroupRefreshWork, GroupAttendeeReconciliationWork, GroupDelegateChangesWork, GroupShareeReconciliationWork,
            ))

        returnValue(self._ok("ok", "Group refresh scheduled"))
开发者ID:eventable,项目名称:CalendarServer,代码行数:16,代码来源:controlapi.py

示例3: action_revisioncleanup

# 需要导入模块: from twext.enterprise.jobs.jobitem import JobItem [as 别名]
# 或者: from twext.enterprise.jobs.jobitem.JobItem import waitWorkDone [as 别名]
    def action_revisioncleanup(self, j):
        """
        Wait for all schedule queue items to complete.
        """
        from txdav.common.datastore.work.revision_cleanup import _triggerRevisionCleanup
        from txdav.common.datastore.work.revision_cleanup import RevisionCleanupWork

        txn = self._store.newTransaction()
        yield _triggerRevisionCleanup(txn, 60)
        yield txn.commit()

        yield JobItem.waitWorkDone(self._store.newTransaction, reactor, 120.0, (
            RevisionCleanupWork,
        ))

        returnValue(self._ok("ok", "RevisionCleanupWork done"))
开发者ID:eventable,项目名称:CalendarServer,代码行数:18,代码来源:controlapi.py


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