Skip to content

Commit fdf1df3

Browse files
committed
fix all readme
1 parent 12e1f6e commit fdf1df3

File tree

312 files changed

+6430
-8506
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

312 files changed

+6430
-8506
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ bin
1313
Nuget*
1414
.idea
1515
node-v12.16.1-linux-x64*
16-
nginx
16+
nginx
17+
index.py

async-task/python3/hook/index.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,6 @@ async function preInit(inputObj) {
77
88
Tips:
99
- FC Component: https://www.serverless-devs.com/fc/readme`)
10-
11-
try {
12-
var process = require('child_process')
13-
const version = (await process.execSync('s -v')).toString()
14-
const versionNumber = version.match(/s: 2\.0\.(.*?),/)[1]
15-
if (Number(versionNumber) < 103) {
16-
console.log('\x1B[31m%s\x1B[0m', ' * The application requires that the version of Serverless Devs is at least 2.0.103')
17-
console.log('\x1B[31m%s\x1B[0m', ' * Plaese upgraded through [npm install -g @serverless-devs/s]\n\n')
18-
}
19-
} catch (e) {
20-
console.log(e)
21-
console.log(` - Serverless Devs Version >= v2.0.103
22-
`)
23-
}
2410
}
2511

2612
async function postInit(inputObj) {

async-task/python3/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Type: Application
22
Name: start-async-task-python3
3-
Version: 0.1.5
3+
Version: 0.1.15
44
Provider:
55
- 阿里云
66
Description: 快速部署一个 Python 3.6 的 async task 函数到阿里云函数计算。

async-task/python3/readme.md

Lines changed: 61 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,84 @@
1-
# 阿里云函数计算 Python3.6 Async Task 函数案例
1+
# start-async-task-python3 帮助文档
22

3-
<toc>
3+
<p align="center" class="flex justify-center">
4+
<a href="https://www.serverless-devs.com" class="ml-1">
5+
<img src="http://editor.devsapp.cn/icon?package=start-async-task-python3&type=packageType">
6+
</a>
7+
<a href="http://www.devsapp.cn/details.html?name=start-async-task-python3" class="ml-1">
8+
<img src="http://editor.devsapp.cn/icon?package=start-async-task-python3&type=packageVersion">
9+
</a>
10+
<a href="http://www.devsapp.cn/details.html?name=start-async-task-python3" class="ml-1">
11+
<img src="http://editor.devsapp.cn/icon?package=start-async-task-python3&type=packageDownload">
12+
</a>
13+
</p>
414

5-
<p align="center"><b> 中文 | <a href="./readme_en.md"> English </a> </b></p>
15+
<description>
616

7-
- [阿里云函数计算 Python3.6 Async Task 函数案例](#阿里云函数计算-python36-async-task-函数案例)
8-
- [快速开始](#快速开始)
9-
- [通过应用中心部署](#通过应用中心部署)
10-
- [通过命令行工具部署](#通过命令行工具部署)
11-
- [通过阿里云CloudShell部署](#通过阿里云cloudshell部署)
12-
- [应用详情](#应用详情)
13-
- [关于我们](#关于我们)
17+
快速部署一个 Python 3.6 的 async task 函数到阿里云函数计算。
1418

15-
</toc>
19+
</description>
1620

17-
# 快速开始
21+
<table>
1822

19-
- [:octocat: 源代码](https://github.com/devsapp/start-fc/tree/main/async-task/python3/src)
23+
## 前期准备
24+
使用该项目,推荐您拥有以下的产品权限 / 策略:
2025

21-
## 通过应用中心部署
26+
| 服务/业务 | 函数计算 |
27+
| --- | --- |
28+
| 权限/策略 | AliyunFCFullAccess<br/>AliyunLogFullAccess |
2229

23-
<appcenter>
30+
</table>
2431

25-
您可以在阿里云 [:earth_asia: Serverless 应用中心](https://fcnext.console.aliyun.com/applications/create?template=start-async-task-python3) ,快速体验该应用:
32+
<codepre id="codepre">
2633

27-
[![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://fcnext.console.aliyun.com/applications/create?template=start-async-task-python3)
34+
# 代码 & 预览
2835

29-
</appcenter>
36+
- [ :smiley_cat: 源代码](https://github.com/devsapp/start-fc/blob/main/async-task/python3)
3037

31-
## 通过命令行工具部署
38+
</codepre>
3239

33-
> 在开始之前,需要先安装 Serverless Devs 开发者工具:`npm install @serverless-devs/s -g`,更多安装方法,可以参考[Serverless Devs 安装文档](https://www.serverless-devs.com/serverless-devs/install) ,针对阿里云还需要配置密钥信息,配置密钥信息的方法可以参考[阿里云密钥配置文档](https://www.serverless-devs.com/fc/config)
40+
<deploy>
3441

35-
- 初始化项目:`s init start-async-task-python3 -d start-async-task-python3`
36-
> 涉及到确定密钥的选择、服务名称的确定、函数名称的确定以及容器镜像的确定
37-
- 进入项目:`cd start-async-task-python3`
38-
- 部署项目:`s deploy -y`
39-
- 调用函数:
40-
- 1. `s async-task invoke -e {} --invocation-type async`, 成功调用一次 task 函数, 预计 30s 后, 函数执行成功, 会触发调用dest-succ 函数一次
41-
- 2. `s async-task invoke -e {"mock_error":1} --invocation-type async`, 调用一次 task 函数, 预期让 task 函数执行失败一次,会触发调用 dest-fail 函数一次
42-
- 3. `s async-task invoke -e {} --invocation-type async`, 成功调用一次 task 函数, 在函数执行过程中,在控制台取消这次任务函数的执行, 会触发调用 dest-fail 函数一次
42+
## 部署 & 体验
4343

44+
<appcenter>
4445

45-
## 通过阿里云CloudShell部署
46+
- :fire: 通过 [Serverless 应用中心](https://fcnext.console.aliyun.com/applications/create?template=start-async-task-python3)
47+
[![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://fcnext.console.aliyun.com/applications/create?template=start-async-task-python3) 该应用。
48+
49+
</appcenter>
4650

47-
如果您不想在应用中心中快速体验,也不想下载命令行工具体验,您也可以在[ :rocket: 阿里云 CloudShell](https://api.aliyun.com/new#/tutorial?action=git_open&git_repo=https://github.com/devsapp/start-fc.git&tutorial=async-task/python3/cloudshell.md) 中快速体验。
51+
- 通过 [Serverless Devs Cli](https://www.serverless-devs.com/serverless-devs/install) 进行部署:
52+
- [安装 Serverless Devs Cli 开发者工具](https://www.serverless-devs.com/serverless-devs/install) ,并进行[授权信息配置](https://www.serverless-devs.com/fc/config)
53+
- 初始化项目:`s init start-async-task-python3 -d start-async-task-python3`
54+
- 进入项目,并进行项目部署:`cd start-async-task-python3 && s deploy -y`
55+
56+
</deploy>
57+
58+
<appdetail id="flushContent">
4859

4960
# 应用详情
5061

62+
63+
5164
本应用仅作为学习和参考使用,您可以基于本项目进行二次开发和完善,实现自己的业务逻辑
5265

53-
# 关于我们
5466

55-
- Serverless Devs 工具:
56-
- 仓库:[https://www.github.com/serverless-devs/serverless-devs](https://www.github.com/serverless-devs/serverless-devs)
57-
> 欢迎帮我们增加一个 :star2:
58-
- 官网:[https://www.serverless-devs.com/](https://www.serverless-devs.com/)
59-
- 阿里云函数计算组件:
60-
- 仓库:[https://github.com/devsapp/fc](https://github.com/devsapp/fc)
61-
- 帮助文档:[https://www.serverless-devs.com/fc/readme](https://www.serverless-devs.com/fc/readme)
62-
- 钉钉交流群:33947367
67+
68+
</appdetail>
69+
70+
<devgroup>
71+
72+
## 开发者社区
73+
74+
您如果有关于错误的反馈或者未来的期待,您可以在 [Serverless Devs repo Issues](https://github.com/serverless-devs/serverless-devs/issues) 中进行反馈和交流。如果您想要加入我们的讨论组或者了解 FC 组件的最新动态,您可以通过以下渠道进行:
75+
76+
<p align="center">
77+
78+
| <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407298906_20211028074819117230.png" width="130px" > | <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407044136_20211028074404326599.png" width="130px" > | <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407252200_20211028074732517533.png" width="130px" > |
79+
|--- | --- | --- |
80+
| <center>微信公众号:`serverless`</center> | <center>微信小助手:`xiaojiangwh`</center> | <center>钉钉交流群:`33947367`</center> |
81+
82+
</p>
83+
84+
</devgroup>

async-task/python3/readme_en.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

async-task/python3/src/readme.md

Lines changed: 61 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,84 @@
1-
# 阿里云函数计算 Python3.6 Async Task 函数案例
1+
# start-async-task-python3 帮助文档
22

3-
<toc>
3+
<p align="center" class="flex justify-center">
4+
<a href="https://www.serverless-devs.com" class="ml-1">
5+
<img src="http://editor.devsapp.cn/icon?package=start-async-task-python3&type=packageType">
6+
</a>
7+
<a href="http://www.devsapp.cn/details.html?name=start-async-task-python3" class="ml-1">
8+
<img src="http://editor.devsapp.cn/icon?package=start-async-task-python3&type=packageVersion">
9+
</a>
10+
<a href="http://www.devsapp.cn/details.html?name=start-async-task-python3" class="ml-1">
11+
<img src="http://editor.devsapp.cn/icon?package=start-async-task-python3&type=packageDownload">
12+
</a>
13+
</p>
414

5-
<p align="center"><b> 中文 | <a href="./readme_en.md"> English </a> </b></p>
15+
<description>
616

7-
- [阿里云函数计算 Python3.6 Async Task 函数案例](#阿里云函数计算-python36-async-task-函数案例)
8-
- [快速开始](#快速开始)
9-
- [通过应用中心部署](#通过应用中心部署)
10-
- [通过命令行工具部署](#通过命令行工具部署)
11-
- [通过阿里云CloudShell部署](#通过阿里云cloudshell部署)
12-
- [应用详情](#应用详情)
13-
- [关于我们](#关于我们)
17+
快速部署一个 Python 3.6 的 async task 函数到阿里云函数计算。
1418

15-
</toc>
19+
</description>
1620

17-
# 快速开始
21+
<table>
1822

19-
- [:octocat: 源代码](https://github.com/devsapp/start-fc/tree/main/async-task/python3/src)
23+
## 前期准备
24+
使用该项目,推荐您拥有以下的产品权限 / 策略:
2025

21-
## 通过应用中心部署
26+
| 服务/业务 | 函数计算 |
27+
| --- | --- |
28+
| 权限/策略 | AliyunFCFullAccess<br/>AliyunLogFullAccess |
2229

23-
<appcenter>
30+
</table>
2431

25-
您可以在阿里云 [:earth_asia: Serverless 应用中心](https://fcnext.console.aliyun.com/applications/create?template=start-async-task-python3) ,快速体验该应用:
32+
<codepre id="codepre">
2633

27-
[![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://fcnext.console.aliyun.com/applications/create?template=start-async-task-python3)
34+
# 代码 & 预览
2835

29-
</appcenter>
36+
- [ :smiley_cat: 源代码](https://github.com/devsapp/start-fc/blob/main/async-task/python3)
3037

31-
## 通过命令行工具部署
38+
</codepre>
3239

33-
> 在开始之前,需要先安装 Serverless Devs 开发者工具:`npm install @serverless-devs/s -g`,更多安装方法,可以参考[Serverless Devs 安装文档](https://www.serverless-devs.com/serverless-devs/install) ,针对阿里云还需要配置密钥信息,配置密钥信息的方法可以参考[阿里云密钥配置文档](https://www.serverless-devs.com/fc/config)
40+
<deploy>
3441

35-
- 初始化项目:`s init start-async-task-python3 -d start-async-task-python3`
36-
> 涉及到确定密钥的选择、服务名称的确定、函数名称的确定以及容器镜像的确定
37-
- 进入项目:`cd start-async-task-python3`
38-
- 部署项目:`s deploy -y`
39-
- 调用函数:
40-
- 1. `s async-task invoke -e {} --invocation-type async`, 成功调用一次 task 函数, 预计 30s 后, 函数执行成功, 会触发调用dest-succ 函数一次
41-
- 2. `s async-task invoke -e {"mock_error":1} --invocation-type async`, 调用一次 task 函数, 预期让 task 函数执行失败一次,会触发调用 dest-fail 函数一次
42-
- 3. `s async-task invoke -e {} --invocation-type async`, 成功调用一次 task 函数, 在函数执行过程中,在控制台取消这次任务函数的执行, 会触发调用 dest-fail 函数一次
42+
## 部署 & 体验
4343

44+
<appcenter>
4445

45-
## 通过阿里云CloudShell部署
46+
- :fire: 通过 [Serverless 应用中心](https://fcnext.console.aliyun.com/applications/create?template=start-async-task-python3)
47+
[![Deploy with Severless Devs](https://img.alicdn.com/imgextra/i1/O1CN01w5RFbX1v45s8TIXPz_!!6000000006118-55-tps-95-28.svg)](https://fcnext.console.aliyun.com/applications/create?template=start-async-task-python3) 该应用。
48+
49+
</appcenter>
4650

47-
如果您不想在应用中心中快速体验,也不想下载命令行工具体验,您也可以在[ :rocket: 阿里云 CloudShell](https://api.aliyun.com/new#/tutorial?action=git_open&git_repo=https://github.com/devsapp/start-fc.git&tutorial=async-task/python3/cloudshell.md) 中快速体验。
51+
- 通过 [Serverless Devs Cli](https://www.serverless-devs.com/serverless-devs/install) 进行部署:
52+
- [安装 Serverless Devs Cli 开发者工具](https://www.serverless-devs.com/serverless-devs/install) ,并进行[授权信息配置](https://www.serverless-devs.com/fc/config)
53+
- 初始化项目:`s init start-async-task-python3 -d start-async-task-python3`
54+
- 进入项目,并进行项目部署:`cd start-async-task-python3 && s deploy -y`
55+
56+
</deploy>
57+
58+
<appdetail id="flushContent">
4859

4960
# 应用详情
5061

62+
63+
5164
本应用仅作为学习和参考使用,您可以基于本项目进行二次开发和完善,实现自己的业务逻辑
5265

53-
# 关于我们
5466

55-
- Serverless Devs 工具:
56-
- 仓库:[https://www.github.com/serverless-devs/serverless-devs](https://www.github.com/serverless-devs/serverless-devs)
57-
> 欢迎帮我们增加一个 :star2:
58-
- 官网:[https://www.serverless-devs.com/](https://www.serverless-devs.com/)
59-
- 阿里云函数计算组件:
60-
- 仓库:[https://github.com/devsapp/fc](https://github.com/devsapp/fc)
61-
- 帮助文档:[https://www.serverless-devs.com/fc/readme](https://www.serverless-devs.com/fc/readme)
62-
- 钉钉交流群:33947367
67+
68+
</appdetail>
69+
70+
<devgroup>
71+
72+
## 开发者社区
73+
74+
您如果有关于错误的反馈或者未来的期待,您可以在 [Serverless Devs repo Issues](https://github.com/serverless-devs/serverless-devs/issues) 中进行反馈和交流。如果您想要加入我们的讨论组或者了解 FC 组件的最新动态,您可以通过以下渠道进行:
75+
76+
<p align="center">
77+
78+
| <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407298906_20211028074819117230.png" width="130px" > | <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407044136_20211028074404326599.png" width="130px" > | <img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1635407252200_20211028074732517533.png" width="130px" > |
79+
|--- | --- | --- |
80+
| <center>微信公众号:`serverless`</center> | <center>微信小助手:`xiaojiangwh`</center> | <center>钉钉交流群:`33947367`</center> |
81+
82+
</p>
83+
84+
</devgroup>

async-task/python3/src/readme_en.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)