支持分布式集群
This commit is contained in:
@@ -182,7 +182,6 @@ class Job:
|
||||
if Config().is_cluster_enabled():
|
||||
if self.cluster.get_lock(lock_id, Cluster.lock_do_order_time,
|
||||
{'node': self.cluster.node_name}): # 获得下单锁
|
||||
QueryLog.add_quick_log('拿到锁' + lock_id).flush()
|
||||
order_result = self.do_order(user)
|
||||
if not order_result: # 下单失败,解锁
|
||||
self.cluster.release_lock(lock_id)
|
||||
|
||||
@@ -83,7 +83,6 @@ class UserJob:
|
||||
return True
|
||||
# 只有主节点才能走到这
|
||||
if self.is_first_time() or not self.check_user_is_login():
|
||||
a = 1
|
||||
self.is_ready = False
|
||||
if not self.handle_login(): return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user