# Path: models/registry.py
# class RegistryModel(BaseModel):
#     table = "registrys"
#     db = "console"
#     
#     fields={
#         "registry_id":True,
#         "container_id":True,
#         "user_name":True,
#         "user_id":True,
#         "inspect_container":True,
#         "run_host":True,
#         "status":True,
#         "logs":True,
#         "update_time":True,
#         'create_time':True
#     }


from models.registry import RegistryModel
from tornado import gen

class RegistryService():
    m_registry = RegistryModel()
    
    @gen.coroutine
    def insert_registry(self,registry,callback=None):
        user_id = registry.get("user_id",None)

# Path: models/registry.py
# class RegistryModel(BaseModel):
#     table = "registrys"
#     db = "console"
#     
#     fields={
#         "registry_id":True,
#         "container_id":True,
#         "user_name":True,
#         "user_id":True,
#         "inspect_container":True,
#         "run_host":True,
#         "status":True,
#         "logs":True,
#         "update_time":True,
#         'create_time':True
#     }


# Path: services/registry.py
from models.registry import RegistryModel
from tornado import gen


class RegistryService():
    m_registry = RegistryModel()
    
    @gen.coroutine
    def insert_registry(self,registry,callback=None):
        user_id = registry.get("user_id",None)

        app = None