示例#1
0
 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
示例#2
0
 def formatHTTPTimestamp(self, timestamp):
     return self.formatHTTPDate(TimeUtils.toDatetime(timestamp))
示例#3
0
 def parseHTTPTimestamp(self, httpDate):
     return TimeUtils.toTimestamp(self.parseHTTPDate(httpDate))
示例#4
0
 def resetStore(self):
     self.store.reset()
     self.varLastUpdate = self.store.get(Variable, u"lastImport")
     self.lastReset = int(TimeUtils.now())
示例#5
0
 def getLastUpdate(self):
     #self.getVarLastUpdate()
     #if self.varLastUpdate is None:
     #    return int(TimeUtils.now())
     #return self.varLastUpdate.Value
     return int(TimeUtils.now())
示例#6
0
 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
示例#7
0
 def parseHTTPTimestamp(self, httpDate):
     return TimeUtils.toTimestamp(self.parseHTTPDate(httpDate))
示例#8
0
 def formatHTTPTimestamp(self, timestamp):
     return self.formatHTTPDate(TimeUtils.toDatetime(timestamp))
示例#9
0
 def getLastUpdate(self):
     #self.getVarLastUpdate()
     #if self.varLastUpdate is None:
     #    return int(TimeUtils.now())
     #return self.varLastUpdate.Value
     return int(TimeUtils.now())
示例#10
0
 def resetStore(self):
     self.store.reset()
     self.varLastUpdate = self.store.get(Variable, u"lastImport")
     self.lastReset = int(TimeUtils.now())