Skip to content

Commit fcecde1

Browse files
author
heimanba
committed
update function desc
1 parent 58e015b commit fcecde1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ Type: Plugin
22
Name: keep-warm-fc
33
Provider:
44
- 阿里云
5-
Version: 0.0.4
6-
Description: 定时请求url的辅助函数
5+
Version: 0.0.5
6+
Description: 定时触发器预热函数,有效降低冷启动的概率
77
HomePage: https://github.com/devsapp/keep-warm-fc
88
Tags: #标签详情
99
- Serverless Devs

src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ module.exports = async function index(inputs, args = {}) {
1818
}
1919
const instance = await loadComponent("devsapp/fc");
2020
const service = lodash.get(inputs, "props.service");
21-
21+
const serviceFunction = lodash.get(inputs, "props.function");
2222

23-
const WARM_FC_FUNCTION_NAME = `_FC_PLUGIN_keep-warm-${lodash.get(service, 'name')}-${lodash.get(inputs, "props.function.name")}`;
23+
const WARM_FC_FUNCTION_NAME = `_FC_PLUGIN_keep-warm-${lodash.get(service, 'name')}-${lodash.get(serviceFunction, 'name')}`;
2424

2525
const newInputs = lodash.assign({}, inputs, {
2626
props: {
2727
service,
2828
region: lodash.get(inputs, "props.region"),
2929
function: {
3030
name: WARM_FC_FUNCTION_NAME,
31-
description: "Serverless Devs Web Framework Helper Function",
31+
description: `当前定时函数由Serverless Devs自动创建,用于定时预热函数【${lodash.get(serviceFunction, 'name')}】`,
3232
codeUri: path.join(__dirname, "helper"),
3333
runtime: "python3",
3434
timeout: 1,

0 commit comments

Comments
 (0)