def warning_callback(sender):
    """
    Callback function to take action on hashcat warning event
    """
    logger.warning('Callback Triggered: WARNING')
    msg_buf = sender.hashcat_status_get_log()
    logger.warning('{}'.format(msg_buf))
    started = rq.registry.StartedJobRegistry(queue=redis_q)
    logger.warning('{}'.format(msg_buf))
    if len(started.get_job_ids()) > 0:
        session = started.get_job_ids()[0]
        logger.warning('{}: {}'.format(session, msg_buf))
        job = redis_q.fetch_job(session)
        if sender.username and 'Separator unmatched' in msg_buf:
            job.meta['TIP'] = 'This algorithm probably doesn\'t' \
                              ' support the username flag'
        if CRACK_CONF['misc']['user_warnings'] is True:
            job.meta['WARNING'] = msg_buf
        job.save_meta()

    Callback function to take action on hashcat warning event
    
crackq/run_hashcat.py