本文整理匯總了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"))
示例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"))
示例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"))