Ejemplo n.º 1
0
    def __init__(self):
        super(Uploader, self).__init__()

        self.stopped = True
        self.log = logging.getLogger('irgsh_node.uploader')
        self.queue = Queue(settings.LOCAL_DATABASE)

        self.force_stop = False
Ejemplo n.º 2
0
    def upload(self, task_id, path, content_type, extra={}):
        from irgsh_node.localqueue import Queue

        data = {}
        data.update(extra)
        data.update({
            'task_id': task_id,
            'path': path,
            'content_type': content_type
        })

        queue = Queue(settings.LOCAL_DATABASE)
        queue.put(data)