Esempio n. 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)
Esempio n. 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)
Esempio n. 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})
Esempio n. 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})
Esempio n. 5
0
 def html(self):
     self.render({
         'version_data': DeviceVersions.generateGraphData(),
         'unknown_version_data': UnknownVersions.generateGraphData(),
         'version_table_data': DeviceVersions.generateGraphData() + UnknownVersions.generateGraphData(),
     })
Esempio n. 6
0
 def json(self):
     json = simplejson.dumps(DeviceVersions.generateGraphData())
     self.response.out.write(json)