Пример #1
0
def get_snowflake_v2(did, wid):
    global epoch
    did = int(did)
    wid = int(wid)
    return template('{{guoidValue}}',
                    guoidValue=guoid_hex(snowflake(did, wid, epoch)))
Пример #2
0
def get_instagram(id):
    global epoch
    return template('{{guoidValue}}', guoidValue=guoid_hex(instagram(id, epoch)))
Пример #3
0
def get_snowflake():
    global datacenterId, workerId, epoch
    return template('{{guoidValue}}',
                    guoidValue=guoid_hex(snowflake(datacenterId, workerId, epoch)))