enforce the drfault tolerance ability
This commit is contained in:
parent
da6c0fa376
commit
e4c69a70f2
|
@ -301,7 +301,7 @@ public class GatherThreadNew implements Runnable {
|
|||
else
|
||||
{
|
||||
logger.error("memosModel.getId() != pkControlModel.getId()");
|
||||
targetDao.updatePkControlTable(pkControlPostsTableName,
|
||||
gatherDao.updatePkControlTable(pkControlPostsTableName,
|
||||
memosModel.getId(), memosModel.getUrl_md5());
|
||||
pkControlModel.setId(model.getId());
|
||||
model.setId(memosModel.getId());
|
||||
|
@ -373,7 +373,7 @@ public class GatherThreadNew implements Runnable {
|
|||
}
|
||||
else
|
||||
{
|
||||
targetDao.updatePkControlTable(pkControlPostsTableName, memosModel2.getId(), memosModel2.getUrl_md5());
|
||||
gatherDao.updatePkControlTable(pkControlPostsTableName, memosModel2.getId(), memosModel2.getUrl_md5());
|
||||
model.setId(memosModel2.getId());
|
||||
controlItem.setId(memosModel2.getId());
|
||||
handleUpdateGatherPosts(controlItem.getId(), model);
|
||||
|
|
|
@ -24,7 +24,16 @@ public interface GatherDao {
|
|||
@Param("taskTableName") String taskTableName,
|
||||
@Param("sourceTableName") String sourceTableName,
|
||||
@Param("targetTableName") String targetTableName);
|
||||
|
||||
|
||||
/**
|
||||
* 更新pk_control_posts
|
||||
* @param targettable
|
||||
* @param id
|
||||
* @param url_md5
|
||||
*/
|
||||
@Update("update ${targettable} set id = #{id} where url_md5 = #{url_md5}")
|
||||
public void updatePkControlTable(@Param("targettable")String targettable,@Param("id")int id,
|
||||
@Param("url_md5")String url_md5);
|
||||
// 查询未处理的task
|
||||
@Select("SELECT BeginId,EndId,BeginTime,EndTime "
|
||||
+ "FROM ${migrationTask} "
|
||||
|
|
Loading…
Reference in New Issue