Esempio n. 1
0
    def add_items(self):
        for task in GiveItemTaskPrototype.from_query(GiveItemTaskPrototype._db_all()):
            item = items_storage[task.item_id]

            self.logger.info('process task %d for item %d' % (task.id, item.id))

            self.add_item(item, task.account_id, notify=True)

            task.remove()
Esempio n. 2
0
    def add_items(self):
        for task in GiveItemTaskPrototype.from_query(
                GiveItemTaskPrototype._db_all()):
            item = items_storage[task.item_id]

            self.logger.info('process task %d for item %d' %
                             (task.id, item.id))

            self.add_item(item, task.account_id, notify=True)

            task.remove()