去除分配医生锁定状态
This commit is contained in:
parent
dfe630016d
commit
2523d50e6c
@ -67,24 +67,6 @@ class AssignDoctorDelayDirectConsumer extends ConsumerMessage
|
|||||||
return Result::DROP;// 销毁
|
return Result::DROP;// 销毁
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
// 检测锁定状态
|
|
||||||
$redis = $this->container->get(Redis::class);
|
|
||||||
$redis_key = "assign_doctor_lock_" . $data['order_inquiry_id'];
|
|
||||||
$redis_lock = $redis->setnx($redis_key,1);
|
|
||||||
|
|
||||||
// 设置过期时间-10s
|
|
||||||
$redis->expire($redis_key,10);
|
|
||||||
if (!$redis_lock){
|
|
||||||
// 设置失败,表示已经设置该值
|
|
||||||
Log::getInstance('queue-AssignDoctor')->info("锁定中,重回队列");
|
|
||||||
return Result::REQUEUE;
|
|
||||||
}
|
|
||||||
}catch (\Exception $e){
|
|
||||||
Log::getInstance('queue-AssignDoctor')->error("错误:" . $e->getMessage());
|
|
||||||
return Result::ACK;
|
|
||||||
}
|
|
||||||
|
|
||||||
Db::beginTransaction();
|
Db::beginTransaction();
|
||||||
try {
|
try {
|
||||||
// 检测分配时间
|
// 检测分配时间
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user