def create_worker(queue, worker_class):
    """
    Creates a non-stop worker to gather tweets

    Arguments:
    ----------

    queue: queue.Queue
        A queue to gather tasks from

    worker_class: class or function returning an object
        The returned object must respond to `work(status, query)`

    Returns:
    --------

    worker: function

        A function to be used to start a working thread
    """
    tweet_worker = worker_class()

    def worker():
        while True:
            args = queue.get(block=True)
            tweet_worker.work(*args)
            queue.task_done()

    return worker