# Path: client/datalake/common/errors.py
# class InsufficientConfiguration(Exception):
#     pass


from os import environ
from .common.errors import InsufficientConfiguration
from logging import getLogger
from threading import Thread
from six.moves._thread import interrupt_main
from six.moves.queue import Queue
from datalake import File, InvalidDatalakeBundle
        from . import __version__
import os
import time
    import pyinotify
    class FakePyinotify(object):

        class ProcessEvent(object):
            pass

    pyinotify = FakePyinotify


def requires_queue(f):
    def wrapped(*args, **kwargs):
        if not has_queue:
            msg = 'This feature requires the queuable deps.  '
            msg += '`pip install datalake[queuable]` to turn this feature on.'
            raise InsufficientConfiguration(msg)
        return f(*args, **kwargs)
    return wrapped


log = getLogger('datalake-queue')


class DatalakeQueueBase(object):

    @requires_queue
    def __init__(self, queue_dir=None):
        self.queue_dir = queue_dir or environ.get('DATALAKE_QUEUE_DIR')
        self._validate_queue_dir()

    def _validate_queue_dir(self):
        if self.queue_dir is None:

# Path: client/datalake/common/errors.py
# class InsufficientConfiguration(Exception):
#     pass


# Path: client/datalake/queue.py
from os import environ
from .common.errors import InsufficientConfiguration
from logging import getLogger
from threading import Thread
from six.moves._thread import interrupt_main
from six.moves.queue import Queue
from datalake import File, InvalidDatalakeBundle
        from . import __version__
import os
import time
    import pyinotify

    class FakePyinotify(object):

        class ProcessEvent(object):
            pass

    pyinotify = FakePyinotify


def requires_queue(f):
    def wrapped(*args, **kwargs):
        if not has_queue:
            msg = 'This feature requires the queuable deps.  '
            msg += '`pip install datalake[queuable]` to turn this feature on.'
            raise InsufficientConfiguration(msg)
        return f(*args, **kwargs)
    return wrapped


log = getLogger('datalake-queue')


class DatalakeQueueBase(object):

    @requires_queue
    def __init__(self, queue_dir=None):
        self.queue_dir = queue_dir or environ.get('DATALAKE_QUEUE_DIR')
        self._validate_queue_dir()

    def _validate_queue_dir(self):
        if self.queue_dir is None:

            raise InsufficientConfiguration('Please set DATALAKE_QUEUE_DIR')