当前位置: 首页>>代码示例>>Python>>正文


Python SessContainer.session_containers方法代码示例

本文整理汇总了Python中juliabox.interactive.SessContainer.session_containers方法的典型用法代码示例。如果您正苦于以下问题:Python SessContainer.session_containers方法的具体用法?Python SessContainer.session_containers怎么用?Python SessContainer.session_containers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在juliabox.interactive.SessContainer的用法示例。


在下文中一共展示了SessContainer.session_containers方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: publish_sessions

# 需要导入模块: from juliabox.interactive import SessContainer [as 别名]
# 或者: from juliabox.interactive.SessContainer import session_containers [as 别名]
 def publish_sessions():
     iid = Compute.get_instance_id()
     for c in SessContainer.session_containers(allcontainers=True):
         if ("Names" in c) and (c["Names"] is not None):
             sessname = SessContainer(c["Id"]).get_name()
             if sessname:
                 JBoxSessionProps.attach_instance(Compute.get_install_id(), sessname, iid, c["Status"])
开发者ID:JuliaLang,项目名称:JuliaBox,代码行数:9,代码来源:srvr_jboxd.py

示例2: refresh_disk_use_status

# 需要导入模块: from juliabox.interactive import SessContainer [as 别名]
# 或者: from juliabox.interactive.SessContainer import session_containers [as 别名]
    def refresh_disk_use_status(container_id_list=None):
        JBoxDefaultPackagesVol.LOCK.acquire()
        bundles = set()
        try:
            if container_id_list is None:
                container_id_list = [cdesc['Id'] for cdesc in SessContainer.session_containers(allcontainers=True)]

            for cid in container_id_list:
                mount_points = JBoxDefaultPackagesVol._get_package_mounts_used(cid)
                bundles.update(mount_points)

            JBoxDefaultPackagesVol.BUNDLES_IN_USE = bundles
            JBoxDefaultPackagesVol.log_info("Packages in use: %r", bundles)
        finally:
            JBoxDefaultPackagesVol.LOCK.release()
开发者ID:EricForgy,项目名称:JuliaBox,代码行数:17,代码来源:defpkg.py

示例3: refresh_disk_use_status

# 需要导入模块: from juliabox.interactive import SessContainer [as 别名]
# 或者: from juliabox.interactive.SessContainer import session_containers [as 别名]
    def refresh_disk_use_status(container_id_list=None):
        JBoxLoopbackVol.LOCK.acquire()
        try:
            nfree = 0
            for idx in range(0, JBoxLoopbackVol.MAX_DISKS):
                if JBoxLoopbackVol._is_reserved(idx):
                    JBoxLoopbackVol.DISK_USE_STATUS[idx] = True
                else:
                    JBoxLoopbackVol.DISK_USE_STATUS[idx] = False
                    nfree += 1

            if container_id_list is None:
                container_id_list = [cdesc['Id'] for cdesc in SessContainer.session_containers(allcontainers=True)]

            for cid in container_id_list:
                disk_ids = JBoxLoopbackVol._get_disk_ids_used(cid)
                for disk_id in disk_ids:
                    JBoxLoopbackVol._mark_disk_used(disk_id)
                    nfree -= 1
            JBoxLoopbackVol.log_info("Loopback Disk free: " + str(nfree) + "/" + str(JBoxLoopbackVol.MAX_DISKS))
        finally:
            JBoxLoopbackVol.LOCK.release()
开发者ID:nkottary,项目名称:JuliaBox,代码行数:24,代码来源:loopback.py

示例4: publish_sessions

# 需要导入模块: from juliabox.interactive import SessContainer [as 别名]
# 或者: from juliabox.interactive.SessContainer import session_containers [as 别名]
 def publish_sessions():
     iid = Compute.get_instance_id()
     for c in SessContainer.session_containers(allcontainers=True):
         if ('Names' in c) and (c['Names'] is not None):
             JBoxSessionProps.attach_instance(Compute.get_install_id(), SessContainer(c['Id']).get_name(), iid,
                                              c["Status"])
开发者ID:nkottary,项目名称:JuliaBox,代码行数:8,代码来源:srvr_jboxd.py


注:本文中的juliabox.interactive.SessContainer.session_containers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。