예제 #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)))