def importFromETree(self, tree, context=None, flags=None): context = self.priyomInterface.importTransaction(tree) self.varLastUpdate.Value = unicode(int(TimeUtils.now())) self.store.commit() self.resetStore() return context
def formatHTTPTimestamp(self, timestamp): return self.formatHTTPDate(TimeUtils.toDatetime(timestamp))
def parseHTTPTimestamp(self, httpDate): return TimeUtils.toTimestamp(self.parseHTTPDate(httpDate))
def resetStore(self): self.store.reset() self.varLastUpdate = self.store.get(Variable, u"lastImport") self.lastReset = int(TimeUtils.now())
def getLastUpdate(self): #self.getVarLastUpdate() #if self.varLastUpdate is None: # return int(TimeUtils.now()) #return self.varLastUpdate.Value return int(TimeUtils.now())
def importFromETree(self, tree, context = None, flags = None): context = self.priyomInterface.importTransaction(tree) self.varLastUpdate.Value = unicode(int(TimeUtils.now())) self.store.commit() self.resetStore() return context