Пример #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.type:
                DeviceAggregate.increment(device.type)
Пример #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.type:
                DeviceAggregate.increment(device.type)
Пример #3
0
    def get(self):
        tpl_values = {
            'device_count': Device.getCount(),
            'devices_count': DeviceAggregate.getKeyCount(),
            'device_data': DeviceAggregate.generateGraphData(),
            'carrier_count': DeviceCarriers.getKeyCount(),
            'country_count': DeviceCountries.getKeyCount(),
        }

        self.render(tpl_values)
Пример #4
0
    def get(self):
        tpl_values = {
            'device_count': Device.getCount(),
            'devices_count': DeviceAggregate.getKeyCount(),
            'device_data': DeviceAggregate.generateGraphData(),
            'carrier_count': DeviceCarriers.getKeyCount(),
            'country_count': DeviceCountries.getKeyCount(),
        }

        self.render(tpl_values)
Пример #5
0
    def get(self):
        db.delete(DeviceAggregate.all().fetch(400))

        total = (Device.all().count() / 10) + 1
        for x in xrange(total):
            offset = x * 10
            taskqueue.add(url='/tasks/AggregateDevicesWorker', params={'offset': offset})
Пример #6
0
    def get(self):
        db.delete(DeviceAggregate.all().fetch(400))

        total = (Device.all().count() / 10) + 1
        for x in xrange(total):
            offset = x * 10
            taskqueue.add(url='/tasks/AggregateDevicesWorker',
                          params={'offset': offset})