简体   繁体   English

有没有办法在Azure中部署一个Python的代码,并在webjob中运行?

[英]Is there a way to deploy a Python code in Azure and run it in webjob?

I have a Python code and received specific instructions saying 'deploy it in Azure and run the job'.我有一个 Python 代码,并收到具体说明“在 Azure 中部署它并运行作业”。 Could anyone help me understand the same?谁能帮我理解同样的事情? I have access to the Blob storage (from where the code is picking the input files and is uploading the output), as well as to Azure Devops.我可以访问 Blob 存储(代码从中选择输入文件并上传输出),以及 Azure Devops。 PS- Non technical person here so would appreciate any help on that. PS-这里的非技术人员将不胜感激任何帮助。

Thank you谢谢

The workaround follows:解决方法如下:

Create a python Script创建一个 python 脚本

Create a python Script (fileName.py)创建一个 python 脚本 (fileName.py)

import sys  
print(sys.version)  
print("our test web job running....")

After creating the file run locally.创建文件后在本地运行。

Make a.Zip file of python script and required folders制作python脚本和所需文件夹的.Zip文件

在此处输入图像描述

Deploy web jobs in Azure App Service在 Azure 应用服务中部署 web 个作业

In your AppService -> Settings Blade -> Select Web Jobs -> Add your Web Job Application在您的AppService -> 设置刀片 -> Select Web 工作-> 添加您的 Web 工作申请

在此处输入图像描述

在此处输入图像描述

Go to the Logs it will show the details of web job information Go 到Logs会显示web job的详细信息

在此处输入图像描述

Reference:参考:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM