• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python service.RedisAppStatus类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中trove.guestagent.datastore.redis.service.RedisAppStatus的典型用法代码示例。如果您正苦于以下问题:Python RedisAppStatus类的具体用法?Python RedisAppStatus怎么用?Python RedisAppStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: prepare

 def prepare(self, context, packages, databases, memory_mb, users,
             device_path=None, mount_point=None, backup_info=None,
             config_contents=None, root_password=None, overrides=None):
     """
     This is called when the trove instance first comes online.
     It is the first rpc message passed from the task manager.
     prepare handles all the base configuration of the redis instance.
     """
     try:
         app = RedisApp(RedisAppStatus.get())
         RedisAppStatus.get().begin_install()
         if device_path:
             device = volume.VolumeDevice(device_path)
             # unmount if device is already mounted
             device.unmount_device(device_path)
             device.format()
             device.mount(mount_point)
             operating_system.update_owner('redis', 'redis', mount_point)
             LOG.debug('Mounted the volume.')
         app.install_if_needed(packages)
         LOG.info(_('Securing redis now.'))
         app.write_config(config_contents)
         app.restart()
         LOG.info(_('"prepare" redis call has finished.'))
     except Exception as e:
         LOG.error(e)
         app.status.set_status(rd_instance.ServiceStatuses.FAILED)
         raise RuntimeError("prepare call has failed.")
开发者ID:bodenr,项目名称:trove,代码行数:28,代码来源:manager.py


示例2: update_status

 def update_status(self, context):
     """
     Updates the redis trove instance. It is decorated with
     perodic task so it is automatically called every 3 ticks.
     """
     LOG.debug("Update status called.")
     RedisAppStatus.get().update()
开发者ID:AlexeyDeyneko,项目名称:trove,代码行数:7,代码来源:manager.py


示例3: prepare

 def prepare(
     self,
     context,
     packages,
     databases,
     memory_mb,
     users,
     device_path=None,
     mount_point=None,
     backup_info=None,
     config_contents=None,
     root_password=None,
 ):
     """
     This is called when the trove instance first comes online.
     It is the first rpc message passed from the task manager.
     prepare handles all the base configuration of the redis instance.
     """
     app = RedisApp(RedisAppStatus.get())
     RedisAppStatus.get().begin_install()
     if device_path:
         device = volume.VolumeDevice(device_path)
         device.format()
         device.mount(system.REDIS_BASE_DIR)
         LOG.debug(_("Mounted the volume."))
     app.install_if_needed(packages)
     LOG.info(_("Securing redis now."))
     app.write_config(config_contents)
     app.complete_install_or_restart()
     LOG.info(_('"prepare" redis call has finished.'))
开发者ID:NeCTAR-RC,项目名称:trove,代码行数:30,代码来源:manager.py


示例4: reset_configuration

 def reset_configuration(self, context, configuration):
     """
     Resets to the default configuration,
     currently this does nothing.
     """
     app = RedisApp(RedisAppStatus.get())
     app.reset_configuration(configuration)
开发者ID:bodenr,项目名称:trove,代码行数:7,代码来源:manager.py


示例5: start_db_with_conf_changes

 def start_db_with_conf_changes(self, context, config_contents):
     """
     Start this redis instance with new conf changes.
     """
     LOG.debug("Start DB with conf changes called.")
     app = RedisApp(RedisAppStatus.get())
     app.start_db_with_conf_changes(config_contents)
开发者ID:AlexeyDeyneko,项目名称:trove,代码行数:7,代码来源:manager.py


示例6: stop_db

 def stop_db(self, context, do_not_start_on_reboot=False):
     """
     Stop this redis instance.
     This method is called when the guest agent
     gets a stop message from the taskmanager.
     """
     app = RedisApp(RedisAppStatus.get())
     app.stop_db(do_not_start_on_reboot=do_not_start_on_reboot)
开发者ID:bodenr,项目名称:trove,代码行数:8,代码来源:manager.py


示例7: restart

 def restart(self, context):
     """
     Restart this redis instance.
     This method is called when the guest agent
     gets a restart message from the taskmanager.
     """
     app = RedisApp(RedisAppStatus.get())
     app.restart()
开发者ID:bodenr,项目名称:trove,代码行数:8,代码来源:manager.py


示例8: start_db_with_conf_changes

 def start_db_with_conf_changes(self, context, config_contents):
     """
     Start this redis instance with new conf changes.
     """
     app = RedisApp(RedisAppStatus.get())
     app.start_db_with_conf_changes(config_contents)
开发者ID:bodenr,项目名称:trove,代码行数:6,代码来源:manager.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python dbaas.get_filesystem_volume_stats函数代码示例发布时间:2022-05-27
下一篇:
Python service.MySqlAppStatus类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap