Skip to content

Commit

Permalink
外部同步块
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghost-chu committed Jan 29, 2025
1 parent 502a2a0 commit 2937b6a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.ghostchu.peerbanhelper.alert.AlertLevel;
import com.ghostchu.peerbanhelper.alert.AlertManager;
import com.ghostchu.peerbanhelper.database.Database;
import com.ghostchu.peerbanhelper.database.dao.AbstractPBHDao;
import com.ghostchu.peerbanhelper.database.dao.impl.BanListDao;
import com.ghostchu.peerbanhelper.downloader.Downloader;
import com.ghostchu.peerbanhelper.downloader.DownloaderLastStatus;
Expand Down Expand Up @@ -584,7 +585,9 @@ public void banWave() {
return null;
};
if (laboratory.isExperimentActivated(Experiments.TRANSACTION_BATCH_BAN_HISTORY_WRITE.getExperiment())) {
TransactionManager.callInTransaction(databaseManager.getDataSource(), callable);
synchronized (AbstractPBHDao.class) {
TransactionManager.callInTransaction(databaseManager.getDataSource(), callable);
}
} else {
callable.call();
}
Expand Down

0 comments on commit 2937b6a

Please sign in to comment.