Skip to content

Commit

Permalink
fix(Batch Deletes): Removes store recounts to stop Mongo crashes (#1514
Browse files Browse the repository at this point in the history
  • Loading branch information
PrinceWaune authored Mar 9, 2020
1 parent 8ce4e3b commit ebd9561
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { SITE_SETTINGS_ID } from 'lib/constants/siteSettings';
import SiteSettings from 'lib/models/siteSettings';
import Client from 'lib/models/client';
import getScopeFilter from 'lib/services/auth/filters/getScopeFilter';
import { updateStatementCountsInOrg } from 'lib/services/lrs';

const markDone = async (batchDeleteId, jobDone) => {
logger.debug(`Removing job for BatchDelete ${batchDeleteId} and marking as done`);
Expand Down Expand Up @@ -135,10 +134,5 @@ export default async ({
});
}

if (done) {
const organisationId = batchDelete.organisation;
await updateStatementCountsInOrg(organisationId);
}

jobDone();
};

0 comments on commit ebd9561

Please sign in to comment.