Esempio n. 1
0
def reset(uid, sid, e_msg):
    """
    Checks in all licences on error.
    :param uid: User ID
    :param sid: Server ID
    :param e_msg: Error message
    """
    Product.reset(sid)
    History.reset(sid)
    Updates.end(uid, 'ERROR', e_msg)
Esempio n. 2
0
def check_year(server_id):
    """
    lmutil.exe does not provide a year with license data, this is a work-around to account for that. Checks in
    all licences if there is a difference between current year and the year of any checked out licenses.
    :param server_id: Id of server
    """
    checked_out = History.time_in_none(server_id)
    for r in checked_out:
        if datetime.now().year != r.time_out.year:
            Product.reset(server_id)
            History.reset(server_id)
            break