當前位置: 首頁>>代碼示例>>Python>>正文


Python CloudHost.log_debug方法代碼示例

本文整理匯總了Python中cloud.aws.CloudHost.log_debug方法的典型用法代碼示例。如果您正苦於以下問題:Python CloudHost.log_debug方法的具體用法?Python CloudHost.log_debug怎麽用?Python CloudHost.log_debug使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在cloud.aws.CloudHost的用法示例。


在下文中一共展示了CloudHost.log_debug方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: run

# 需要導入模塊: from cloud.aws import CloudHost [as 別名]
# 或者: from cloud.aws.CloudHost import log_debug [as 別名]
 def run(self):
     if CloudHost.ENABLED['route53']:
         try:
             CloudHost.deregister_instance_dns()
             CloudHost.log_warn("Prior dns registration was found for the instance")
         except:
             CloudHost.log_debug("No prior dns registration found for the instance")
         CloudHost.register_instance_dns()
     JBoxContainer.publish_container_stats()
     JBox.do_update_user_home_image()
     JBoxContainer.async_refresh_disks()
     self.ct.start()
     self.ioloop.start()
開發者ID:barrygolden,項目名稱:JuliaBox,代碼行數:15,代碼來源:jbox.py

示例2: monitor_registrations

# 需要導入模塊: from cloud.aws import CloudHost [as 別名]
# 或者: from cloud.aws.CloudHost import log_debug [as 別名]
    def monitor_registrations():
        max_rate = JBoxDynConfig.get_registration_hourly_rate(CloudHost.INSTALL_ID)
        rate = JBoxUserV2.count_created(1)
        reg_allowed = JBoxDynConfig.get_allow_registration(CloudHost.INSTALL_ID)
        CloudHost.log_debug("registration allowed: %r, rate: %d, max allowed: %d", reg_allowed, rate, max_rate)

        if (reg_allowed and (rate > max_rate*1.1)) or ((not reg_allowed) and (rate < max_rate*0.9)):
            reg_allowed = not reg_allowed
            CloudHost.log_warn("Changing registration allowed to %r", reg_allowed)
            JBoxDynConfig.set_allow_registration(CloudHost.INSTALL_ID, reg_allowed)

        if reg_allowed:
            num_pending_activations = JBoxUserV2.count_pending_activations()
            if num_pending_activations > 0:
                CloudHost.log_info("scheduling activations for %d pending activations", num_pending_activations)
                JBoxContainer.async_schedule_activations()
開發者ID:barrygolden,項目名稱:JuliaBox,代碼行數:18,代碼來源:jbox.py


注:本文中的cloud.aws.CloudHost.log_debug方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。