Skip to content

Redundant conditions? #384

Answered by jongpie
rmccu asked this question in Q&A
Oct 3, 2022 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

Hi @rmccu - the gap that you're referring to is exactly the goal of this. My intent is for the code to make the callout at least once per 24 hours to ensure that the API details (retrieved via the callout) are accurate. At one point, the code only used WHERE CreatedDate >= :fourHoursAgo, which caused problems in some larger orgs with ongoing logging. In these orgs, there were scheduled jobs running hourly, so there was always 1+ Log__c created within the last 4 hours. As a result, LogEntryEventHandler would continue to use a queried Log__c record - the callout wasn't executed for a while (a few weeks, if I remember correctly), resulting in stale data. By changing the query to WHERE Create…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@rmccu
Comment options

@rmccu
Comment options

@rmccu
Comment options

@jongpie
Comment options

Answer selected by jongpie
Comment options

You must be logged in to vote
1 reply
@jongpie
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants