0
나는 함수에서 여러 작업을하고 난 내가하는 기능 아래와 같이 가지고 예를 들어,이 트랜잭션 작업
에 대한 레디 스 큐를 사용하고자하는 기능
에서 트랜잭션을 사용
핸들 거래
private function check_destination_delivered($request,$id,$order)
{
if ($request->get('status') == 'destination_delivered')
{
$this->destination_verification($request);
DB::beginTransaction();
try
{
$this->calculate_credit($id,$order);
$this->calculate_customer_gift_credit($id,$order);
DB::commit();
}
catch (\Exception $e)
{
DB::rollback();
return $this->respondUnprocessable(1180,'error', $e);
}
}
}
이 기능에
내가이 라인
$this->destination_verification($request);
트랜잭션 전에 실행 시작이 라인을 한 후 원하는 :
$this->calculate_credit($id,$order);
$this->calculate_customer_gift_credit($id,$order);
사용 레디 스 나중에 몇 시간을 계산하고 수행 할 수있는이 모든 작업에 트랜잭션을 사용하기 위해 대기하고 일부 작업을 다시 실행 .queue 실패 할 경우 모든 작업은 내가하여 문제를 해결
친구를 도와주세요 – amirali
아무도 ........? – amirali