本文整理汇总了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"))