Merge pull request #1259 from pmw1014/patch-2

Update snowflake.md
This commit is contained in:
黄朝晖 2020-01-12 15:30:23 +08:00 committed by GitHub
commit 8084026312
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
],
];
```