1
0
mirror of synced 2025-12-16 18:18:10 +08:00
Files
SnowFlake-IdGenerator/Python/test.py
2022-08-07 16:33:59 +08:00

19 lines
351 B
Python

from source import Options,Generator
if __name__ == '__main__':
try:
options = Options.IdGeneratorOptions(workerId=23,seqBitLength=10)
options.BaseTime = 1231111111
idgen = Generator.DefaultIdGenerator()
idgen.SetIdGernerator(options)
uid = idgen.NextId()
print(uid)
print(options.__dict__)
except ValueError as e:
print(e)