Fixed missing external cover import
This commit is contained in:
@@ -41,7 +41,7 @@ namespace lms::scanner
|
||||
namespace
|
||||
{
|
||||
constexpr std::size_t readBatchSize{ 100 };
|
||||
constexpr std::size_t writeBatchSize{ 10 };
|
||||
constexpr std::size_t writeBatchSize{ 20 };
|
||||
|
||||
struct ReleaseImageAssociation
|
||||
{
|
||||
@@ -166,15 +166,15 @@ namespace lms::scanner
|
||||
|
||||
void updateReleaseImages(db::Session& session, ReleaseImageAssociationContainer& imageAssociations)
|
||||
{
|
||||
if (imageAssociations.empty())
|
||||
return;
|
||||
|
||||
auto transaction{ session.createWriteTransaction() };
|
||||
|
||||
for (std::size_t i{}; !imageAssociations.empty() && i < writeBatchSize; ++i)
|
||||
while (!imageAssociations.empty())
|
||||
{
|
||||
updateReleaseImage(session, imageAssociations.front());
|
||||
imageAssociations.pop_front();
|
||||
auto transaction{ session.createWriteTransaction() };
|
||||
|
||||
for (std::size_t i{}; !imageAssociations.empty() && i < writeBatchSize; ++i)
|
||||
{
|
||||
updateReleaseImage(session, imageAssociations.front());
|
||||
imageAssociations.pop_front();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user