示例#1
0
def scheduleGroupRefreshJob(service, store):
    """
    Schedule GroupCacherPollingWork
    """
    txn = store.newTransaction()
    print("Scheduling a group refresh")
    yield GroupCacherPollingWork.reschedule(txn, 0, force=True)
    yield txn.commit()
示例#2
0
def scheduleGroupRefreshJob(service, store):
    """
    Schedule GroupCacherPollingWork
    """
    txn = store.newTransaction()
    print("Scheduling a group refresh")
    yield GroupCacherPollingWork.reschedule(txn, 0, force=True)
    yield txn.commit()
示例#3
0
    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"))
示例#4
0
    def action_refreshgroups(self, j):
        txn = self._store.newTransaction(label="ControlAPIResource.action_refreshgroups")
        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"))
示例#5
0
        def groupPollNow(txn):
            from txdav.who.groups import GroupCacherPollingWork

            return GroupCacherPollingWork.reschedule(txn, 0, force=True)
示例#6
0
 def groupPollNow(txn):
     return GroupCacherPollingWork.reschedule(txn, 0, force=True)
示例#7
0
 def groupPollNow(txn):
     from txdav.who.groups import GroupCacherPollingWork
     return GroupCacherPollingWork.reschedule(txn, 0, force=True)
示例#8
0
 def groupPollNow(txn):
     return GroupCacherPollingWork.reschedule(txn, 0, force=True)