Skip to content
Permalink
Browse files

fix(snowflake): fix error shift

  • Loading branch information...
numb3r3 committed Sep 24, 2019
1 parent fede29c commit 2f539b7ade255044d68b75a46b220f4888679005
Showing with 2 additions and 2 deletions.
  1. +2 −2 gnes/uuid.py
@@ -51,8 +51,8 @@ def __init__(self,
self.max_counter_mask = -1 ^ -1 << self.counter_bits

self.machine_shift = self.counter_bits
self.datacenter_shift = self.counter_bits + self.machine_shift
self.timestamp_shift = self.counter_bits + self.machine_shift + self.datacenter_shift
self.datacenter_shift = self.counter_bits + self.machine_bits
self.timestamp_shift = self.counter_bits + self.machine_bits + self.datacenter_bits

self.twepoch = int(time.mktime(time.strptime('2019-01-01 00:00:00', "%Y-%m-%d %H:%M:%S")))
self.last_timestamp = -1

0 comments on commit 2f539b7

Please sign in to comment.
You can’t perform that action at this time.