File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,40 @@ openapi JSON 数据在线地址
100100
101101全局默认使用的 Redis 逻辑数据库(0 - 15)
102102
103+ ## Snowflake(雪花算法)
104+
105+ ### ` SNOWFLAKE_DATACENTER_ID ` <Badge type =" info " text =" int " />
106+
107+ 雪花算法数据中心 ID
108+
109+ ### ` SNOWFLAKE_WORKER_ID ` <Badge type =" info " text =" int " />
110+
111+ 雪花算法工作机器 ID
112+
113+ ::: warning
114+ ` SNOWFLAKE_DATACENTER_ID ` 和 ` SNOWFLAKE_WORKER_ID ` 仅允许同时非 None 或同时为 None
115+
116+ 同时非 None 时,雪花算法将应用此配置(仅适用于单机单进程场景)
117+
118+ 同时为 None 时,雪花算法将自动分配此配置(适用于多线程,多进程,分布式等场景)
119+ :::
120+
121+ ### ` SNOWFLAKE_REDIS_PREFIX ` <Badge type =" info " text =" str " />
122+
123+ 雪花算法配置存储到 Redis 时的前缀
124+
125+ ### ` SNOWFLAKE_HEARTBEAT_INTERVAL_SECONDS ` <Badge type =" info " text =" int " />
126+
127+ 雪花算法配置存储到 Redis 后的心跳检测间隔时间(秒)
128+
129+ ::: warning
130+ 此配置不应大于 ` SNOWFLAKE_NODE_TTL_SECONDS `
131+ :::
132+
133+ ### ` SNOWFLAKE_NODE_TTL_SECONDS ` <Badge type =" info " text =" int " />
134+
135+ 雪花算法配置存储到 Redis 时的生存时间(秒)
136+
103137## Token 配置
104138
105139### ` TOKEN_SECRET_KEY ` <Badge type =" info " text =" str " /> <Badge type =" warning " text =" env " />
You can’t perform that action at this time.
0 commit comments