def isOSMTileUpdated(self, x, y, z): key_name = '%d,%d,%d' % (x, y, z) t = OSMTile.get_by_key_name(key_name) now = datetime.datetime.utcnow() if t: self.response.out.write( "updated %d seconds ago\n" % timedelta_to_seconds(now - t.time_fetched) ) return True else: return False
def isOSMTileUpdated(self, x, y, z): key_name = '%d,%d,%d' % (x, y, z) t = OSMTile.get_by_key_name(key_name) now = datetime.datetime.utcnow() if t: self.response.out.write("updated %d seconds ago\n" % timedelta_to_seconds(now - t.time_fetched)) return True else: return False
def MarkOSMTileUpdated(self, x, y, z): key_name = '%d,%d,%d' % (x, y, z) t = OSMTile.get_by_key_name(key_name) if not t: t = OSMTile(key_name=key_name) t.put()