def get_pauses(jid=None):
    '''
    Get a report on all of the currently paused state runs and pause
    run settings.
    Optionally send in a jid if you only desire to see a single pause
    data set.
    '''
    ret = {}
    active = __salt__['saltutil.is_running']('state.*')
    pause_dir = os.path.join(__opts__['cachedir'], 'state_pause')
    if not os.path.exists(pause_dir):
        return ret
    if jid is None:
        jids = os.listdir(pause_dir)
    elif isinstance(jid, list):
        jids = salt.utils.data.stringify(jid)
    else:
        jids = [six.text_type(jid)]
    for scan_jid in jids:
        is_active = False
        for active_data in active:
            if active_data['jid'] == scan_jid:
                is_active = True
        if not is_active:
            try:
                pause_path = os.path.join(pause_dir, scan_jid)
                os.remove(pause_path)
            except OSError:
                # Already gone
                pass
            continue
        data, pause_path = _get_pause(scan_jid)
        ret[scan_jid] = data
    return ret
Get a report on all of the currently paused state runs and pause
    run settings.
    Optionally send in a jid if you only desire to see a single pause
    data set.