Beispiel #1
0
    def post(self):
        offset = int(self.request.get('offset'))

        devices = Device.all().fetch(10, offset)
        for device in devices:
            logging.debug("Device: %s" % device.key().name())
            if device.version:
                DeviceVersions.increment(device.version)
Beispiel #2
0
    def post(self):
        offset = int(self.request.get('offset'))

        devices = Device.all().fetch(10, offset)
        for device in devices:
            logging.debug("Device: %s" % device.key().name())
            if device.version:
                DeviceVersions.increment(device.version)
Beispiel #3
0
    def get(self):
        db.delete(DeviceVersions.all().fetch(400))

        total = (Device.all().count() / 10) + 1
        for x in xrange(total):
            offset = x * 10
            taskqueue.add(url='/tasks/AggregateVersionsWorker', params={'offset': offset})
Beispiel #4
0
    def get(self):
        db.delete(DeviceVersions.all().fetch(400))

        total = (Device.all().count() / 10) + 1
        for x in xrange(total):
            offset = x * 10
            taskqueue.add(url='/tasks/AggregateVersionsWorker',
                          params={'offset': offset})
Beispiel #5
0
 def html(self):
     self.render({
         'version_data': DeviceVersions.generateGraphData(),
         'unknown_version_data': UnknownVersions.generateGraphData(),
         'version_table_data': DeviceVersions.generateGraphData() + UnknownVersions.generateGraphData(),
     })
Beispiel #6
0
 def json(self):
     json = simplejson.dumps(DeviceVersions.generateGraphData())
     self.response.out.write(json)