forked from 18226598153/JD_tencent_scf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
69 lines (68 loc) · 1.93 KB
/
serverless.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#组件信息
component: scf # (必选) 组件名称,在该实例中为scf
name: jd-script # (必选) 组件实例名称。
#组件参数配置
inputs:
name: scf-${name} # 云函数名称,默认为 ${name}-${stage}-${app}
namespace: default
enableRoleAuth: true # 默认会尝试创建 SCF_QcsRole 角色,如果不需要配置成 false 即可
src:
src: ./src
exclude:
- '*.!(js|txt|json)'
- 'backUp/**'
- 'icon/**'
- 'package.json'
- 'package-lock.json'
- 'LICENSE'
- 'ql.js'
- 'jd_CheckCK.js'
handler: index.main_handler #入口
runtime: Nodejs12.16 # 运行环境 默认 Nodejs12.16
region: ap-guangzhou # 函数所在区域
description: This is a function in ${app} application.
memorySize: 64 # 内存大小,单位MB
timeout: 450 # 超时时间,单位秒
asyncRunEnable: true # 是否启用异步执行
traceEnable: true
retryNum: 0
events: #触发器
- timer:
parameters:
name: config
cronExpression: "0 0 * * * * *"
enable: true
argument: config
- timer: #超市蓝币兑换
parameters:
name: blueCoin
cronExpression: "0 59 23 * * * *"
enable: false
argument: jd_blueCoin
- timer:
parameters:
name: cfd
cronExpression: "59 0 0 * * * *"
enable: true
argument: jd_cfd
- timer:
parameters:
name: cfd_pearl
cronExpression: "50 59 * * * * *"
enable: true
argument: jd_cfd_pearl_ex
- timer:
parameters:
name: jxmc
cronExpression: "59 19 0 * * * *"
enable: true
argument: jd_jxmc
- timer:
parameters:
name: jd_redrain_half
cronExpression: "59 29 21,22 * * * *"
enable: true
argument: jd_redrain_half
environment:
variables: #环境变量
TZ: Asia/Shanghai