INNER CODE UNIT · Python

init

LiuChangFreeman/OneIndexServerless · Deploy/Back/main.py:223

def init():
    global token,oss_available
    try:
        service = oss2.Service(auth, oss_end_point.replace("http://", ""), connect_timeout=1)
        service.list_buckets()
        oss_available=True
        path_token ="{}/{}".format(path_oss_store,filename_token)
        if bucket.object_exists(path_token):
            token = bucket.get_object(path_token)
            token = json.loads(token.read())
    except:
        pass

if __name__=="__main__":
    init()
    app.run()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…