-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.toml
More file actions
38 lines (31 loc) · 1.1 KB
/
Copy pathwrangler.toml
File metadata and controls
38 lines (31 loc) · 1.1 KB
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
# Cloudflare Workers 配置,线上已由deploy.yml接管,这里仅供本地测试
name = "edgeprobe"
main = "src/index.ts"
compatibility_date = "2024-12-01"
compatibility_flags = ["nodejs_compat"]
keep_vars = true
# 定时任务配置(UTC)
# - 每分钟:执行离线节点检测
# - 每小时:合并执行其他定时任务(每月1号数据清理、每月8号清理旧表、每天12点服务器到期检测)
# - 注意同步修改deploy和index.ts scheduled函数里面的值
[triggers]
crons = ["*/1 * * * *", "0 * * * *"]
[assets]
directory = "./dist"
binding = "ASSETS"
[[d1_databases]]
binding = "DB"
database_name = "server-monitor-db"
# Durable Objects:实时指标广播中心
# 注意:首次部署前需要执行 `wrangler durable-object create MetricsBroadcaster --class MetricsBroadcaster`
# 或者在部署后,wrangler 会自动创建对应的 DO namespace。
[[durable_objects.bindings]]
name = "METRICS_BROADCASTER"
class_name = "MetricsBroadcaster"
[[migrations]]
tag = "v1"
new_sqlite_classes = ["MetricsBroadcaster"]
# 开发服务器配置
[dev]
port = 8787
local_protocol = "https"