Make a Queueable retry idempotent
A retry is idempotent when running it twice has the same effect as once.
Your task
Complete the Queueable so each operation key adds 1 to an Account's NumberOfEmployees at most once, even when an old key comes back late.
public class AS_F101E8C41745_IdempotentSyncJob implements Queueable {
private Set<Id> accountIds;
private String operationKey;
public AS_F101E8C41745_IdempotentSyncJob(Set<Id> accountIds, String operationKey) {
this.accountIds = accountIds;
this.operationKey = operationKey;
}
public void execute(QueueableContext context) {
}
}Requirements
- appliesFirstOperation should pass
- skipsDuplicateQueuedRetries should pass
- skipsLateRetryOfOlderKey should pass
- appliesLookalikeKey should pass
- processesTwoHundredAccounts should pass