支持分布式集群

This commit is contained in:
Jalin
2019-01-10 13:47:31 +08:00
parent c804de2e07
commit 2ee8dc5da1
5 changed files with 54 additions and 5 deletions

View File

@@ -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)

View File

@@ -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