如何在Azure上运行基本的Python脚本以将数据保存在DB中

发布于 2025-01-28 01:48:07 字数 314 浏览 3 评论 0原文

我想在Azure上运行一个python脚本,该脚本连接到Azure Bus队列并将数据保存到数据库中。我在Azure服务计划应用程序上安装了脚本,但是仅当我通过SSH连接到该应用程序时,该脚本才会运行(为什么?)。我已经看到许多建议使用Azure函数的帖子(但它们是由SSH请求触发的,不是我的情况)或使用Runbooks,但我不知道它是如何工作的以及是否可以将其用于我的情况。你有建议吗?

  • 我应该在应用程序,功能或运行书之间使用什么?

或者,

  • 即使我与应用程序没有SSH连接,我该如何使我的脚本工作? 预先感谢您的帮助

I would like to run a python script on Azure that connects to an Azure bus queue and saves the data to a database. I installed my script on an Azure service plan app but the script runs only when I am connected by ssh to the app (why?). I have seen many posts that recommend to either use azure functions (but they are triggered by ssh requests which is not my case) or to use runbooks but I have no idea how it works and if I can use that for my case. Do you have any advice?

  • What should I use between app, functions or runbook?

or

  • how can I make my script work even when I don't have an ssh connection with my app?
    Thank you in advance for your help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文