Skip to content

Commit

Permalink
v1.2.8 - With the actual scoping fix for #69
Browse files Browse the repository at this point in the history
  • Loading branch information
jamessimone committed Apr 11, 2021
1 parent ad06057 commit 30bedbd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Create fast, scalable custom rollups driven by Custom Metadata in your Salesforc

### Package deployment options

<a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008GJNqAAO">
<a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008GJNvAAO">
<button>Deploy Unmanaged Package to Prod</button>
</a>

<a href="https://test.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008GJNqAAO">
<a href="https://test.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008GJNvAAO">
<button>Deploy Unmanaged Package to Sandbox</button>
</a>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apex-rollup",
"version": "1.2.7",
"version": "1.2.8",
"description": "Fast, configurable, elastically scaling custom rollup solution. Apex Invocable action, one-liner Apex trigger/CMDT-driven logic, and scheduled Apex-ready.",
"repository": {
"type": "git",
Expand Down
8 changes: 4 additions & 4 deletions rollup/core/classes/Rollup.cls
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ global without sharing virtual class Rollup implements Database.Batchable<SObjec
// specially to validate that the buffer is flushed when "processStoredFlowRollups" is called
@testVisible
private static List<Rollup> FLOW_ROLLUPS = new List<Rollup>();
private static Boolean isRunningAsync = false;

private static Boolean isCDC = false;
private static Boolean isDeferralAllowed = true;
Expand All @@ -48,7 +49,6 @@ global without sharing virtual class Rollup implements Database.Batchable<SObjec
protected final RollupInvocationPoint invokePoint;

// non-final instance variables
private Boolean isRunningAsync = false;
private Boolean isFullRecalc = false;
private Boolean isCDCUpdate = false;
private Boolean isNoOp;
Expand Down Expand Up @@ -246,11 +246,11 @@ global without sharing virtual class Rollup implements Database.Batchable<SObjec
this.process(this.syncRollups);
return 'Running rollups flagged to go synchronously';
} else if (shouldBatch && hasMoreThanOneTarget == false) {
this.isRunningAsync = true;
isRunningAsync = true;
// safe to batch because the QueryLocator will only return one type of SObject
return Database.executeBatch(new Rollup(this), this.rollupControl.BatchChunkSize__c.intValue());
} else {
this.isRunningAsync = true;
isRunningAsync = true;
return System.enqueueJob(this);
}
}
Expand Down Expand Up @@ -2351,7 +2351,7 @@ global without sharing virtual class Rollup implements Database.Batchable<SObjec
if (rollupSpecificControl.ShouldAbortRun__c) {
this.rollups.remove(index);
} else if (
rollupSpecificControl.ShouldRunAs__c == 'Synchronous Rollup' || hasExceededCurrentRollupLimits(rollupSpecificControl) == false && this.isRunningAsync
rollupSpecificControl.ShouldRunAs__c == 'Synchronous Rollup' || hasExceededCurrentRollupLimits(rollupSpecificControl) == false && isRunningAsync
) {
this.rollups.remove(index);
this.syncRollups.add(rollup);
Expand Down
5 changes: 3 additions & 2 deletions sfdx-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"default": true,
"package": "apex-rollup",
"path": "rollup",
"versionNumber": "1.2.7.0"
"versionNumber": "1.2.8.0"
}
],
"namespace": "",
Expand All @@ -13,6 +13,7 @@
"packageAliases": {
"apex-rollup": "0Ho6g000000TNcOCAW",
"apex-rollup@1.2.6-0": "04t6g000008GJMsAAO",
"apex-rollup@1.2.7-0": "04t6g000008GJNqAAO"
"apex-rollup@1.2.7-0": "04t6g000008GJNqAAO",
"apex-rollup@1.2.8-0": "04t6g000008GJNvAAO"
}
}

0 comments on commit 30bedbd

Please sign in to comment.