|
|
@ -7,7 +7,6 @@ import com.epmet.commons.tools.redis.RedisUtils; |
|
|
|
import com.epmet.constant.EpidemicConstant; |
|
|
|
import com.epmet.dao.IcSyncJobDao; |
|
|
|
import com.epmet.entity.IcSyncJobEntity; |
|
|
|
import com.epmet.service.DataSyncConfigService; |
|
|
|
import com.epmet.service.IcResiComparisonRecordService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.redisson.api.RLock; |
|
|
@ -20,12 +19,14 @@ import java.util.List; |
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
|
|
|
|
import static com.epmet.constant.EpidemicConstant.JOB_TYPE_NAT; |
|
|
|
|
|
|
|
// 烟台数据比对
|
|
|
|
/** |
|
|
|
* @Description 居民一致性对比任务处理器 |
|
|
|
* @Author wxz |
|
|
|
* @Date 2022/11/15 下午5:54 |
|
|
|
*/ |
|
|
|
@Component |
|
|
|
@Slf4j |
|
|
|
public class YanTaiComparisonSyncProcessor { |
|
|
|
public class YanTaiResiComparisonSyncProcessor { |
|
|
|
|
|
|
|
public static final int MAX_EXECUTING_COUNT = 3; |
|
|
|
|
|
|
@ -67,10 +68,10 @@ public class YanTaiComparisonSyncProcessor { |
|
|
|
|
|
|
|
RLock lock = null; |
|
|
|
try { |
|
|
|
lock = distributedLock.getLock("data:sync:" + "comparison", 60L, 60L, TimeUnit.SECONDS); |
|
|
|
lock = distributedLock.getLock("data:sync:comparison:resi", 60L, 60L, TimeUnit.SECONDS); |
|
|
|
// 查询可执行的任务列表,并且异步执行
|
|
|
|
List<IcSyncJobEntity> icSyncJobToExec = icSyncJobDao.selectExecutableJobList( |
|
|
|
EpidemicConstant.JOB_TYPE_COMPARISON, |
|
|
|
EpidemicConstant.JOB_TYPE_COMPARISON_RESI, |
|
|
|
leftCount); |
|
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(icSyncJobToExec)) { |