當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。