mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-01 19:27:39 +08:00
commit
8084026312
@ -45,6 +45,7 @@ composer require hyperf/snowflake
|
||||
declare(strict_types=1);
|
||||
|
||||
use Hyperf\Snowflake\MetaGenerator\RedisMilliSecondMetaGenerator;
|
||||
use Hyperf\Snowflake\MetaGenerator\RedisSecondMetaGenerator;
|
||||
use Hyperf\Snowflake\MetaGeneratorInterface;
|
||||
|
||||
return [
|
||||
@ -55,6 +56,12 @@ return [
|
||||
// 用于计算 WorkerId 的 Key 键
|
||||
'key' => RedisMilliSecondMetaGenerator::DEFAULT_REDIS_KEY
|
||||
],
|
||||
RedisSecondMetaGenerator::class => [
|
||||
// Redis Pool
|
||||
'pool' => 'default',
|
||||
// 用于计算 WorkerId 的 Key 键
|
||||
'key' => RedisMilliSecondMetaGenerator::DEFAULT_REDIS_KEY
|
||||
],
|
||||
];
|
||||
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user