The work functions

def work(options):
    """The work functions"""
    # pylint: disable=too-many-locals
    record = get_record(options)
    _, mainv, dailyv, _, _, _, safebrowsingv, bytecodev = record.split(':')
    versions = {'main': mainv, 'daily': dailyv,
                'safebrowsing': safebrowsingv,
                'bytecode': bytecodev}
    dqueue = Queue(maxsize=0)
    dqueue_workers = 3
    info("[+] \033[92mStarting workers\033[0m")
    for index in range(dqueue_workers):
        info("=> Starting diff download worker: %d" % (index + 1))
        worker = Thread(target=download_diffs, args=(dqueue,))
        worker.setDaemon(True)
        worker.start()
    mqueue = Queue(maxsize=0)
    mqueue_workers = 4
    for index in range(mqueue_workers):
        info("=> Starting signature download worker: %d" % (index + 1))
        worker = Thread(target=update_sig, args=(mqueue,))
        worker.setDaemon(True)
        worker.start()
    for signature_type in ['main', 'daily', 'bytecode', 'safebrowsing']:
        if signature_type in ['daily', 'bytecode', 'safebrowsing']:
            # cdiff downloads
            localver = get_local_version(options.mirrordir, signature_type)
            remotever = versions[signature_type]
            if localver is not None:
                dqueue.put(
                    (
                        options,
                        signature_type,
                        localver,
                        remotever
                    )
                )
        mqueue.put((options, signature_type, versions))
    info("=> Waiting on workers to complete tasks")
    dqueue.join()
    mqueue.join()
    info("=> Workers done processing queues")
    create_dns_file(options, record)
    sys.exit(0)