Example #1
0
 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
Example #2
0
 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
Example #3
0
 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()
Example #4
0
 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()