當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。