示例#1
0
 def generate_sequence_number():
     fastcounter.incr("delivery_zones", delta=100, update_interval=1)
     return fastcounter.get_count("delivery_zones") + random.randint(1, 100)
示例#2
0
 def generate_id():
     value = fastcounter.get_count("order_id")
     fastcounter.incr("order_id")
     return value + 1
示例#3
0
 def generate_priority():
     fastcounter.incr("promo", delta=100, update_interval=1)
     return fastcounter.get_count("promo") + random.randint(1, 100)
示例#4
0
 def generate_id():
     fastcounter.incr("group_choice_id", delta=100, update_interval=1)
     return fastcounter.get_count("group_choice_id") + random.randint(1, 100)
示例#5
0
 def generate_sequence_number():
     fastcounter.incr("category", delta=100, update_interval=1)
     return fastcounter.get_count("category") + random.randint(1, 100)
示例#6
0
 def generate_sequence_number(self):
     fastcounter.incr("category_%s" % self.key.id(), delta=100, update_interval=1)
     return fastcounter.get_count("category_%s" % self.key.id()) + random.randint(1, 100)
示例#7
0
 def generate_sequence_number():
     fastcounter.incr("group_modifier", delta=100, update_interval=1)
     return fastcounter.get_count("group_modifier") + random.randint(1, 100)
示例#8
0
 def generate_choice_sequence_number(self):
     fastcounter.incr("group_modifier_choice_%s" % self.key.id(), delta=100, update_interval=1)
     return fastcounter.get_count("group_modifier_choice_%s" % self.key.id()) + random.randint(1, 100)