Cory Weiner
05/24/2022, 1:16 PMmichoel
05/24/2022, 1:28 PMCory Weiner
05/24/2022, 1:36 PMtech_ph2019
05/24/2022, 2:43 PMShawn Talbert
05/24/2022, 5:48 PMmichoel
05/24/2022, 6:42 PMbattk
05/25/2022, 12:42 AMbattk
05/25/2022, 12:43 AMShawn Talbert
05/25/2022, 7:08 PMCory Weiner
05/25/2022, 7:12 PMShawn Talbert
05/25/2022, 7:17 PMShawn Talbert
05/25/2022, 7:20 PMShawn Talbert
05/25/2022, 7:20 PM/**
* main script entrypoint
*/
export function execute () {
getEligibleTransactions() // start with search of arbitrary result length
.map(nsSearchResult2obj<SearchResult>()) // convert results into nice strong-typed object
.takeWhile(autoReschedule()) // Automatically reschedule the current task if governance is exhausted.
.forEach(result => {
const finalResult = _.attempt(X.mainLogic, result) // execute the main logic for each result, capturing exceptions
if (_.isError(finalResult)) {
log.warn('unexpected failure while processing', { recordid: result!.id, finalResult })
} else <http://log.info|log.info>('final result', finalResult)
})
}
Shawn Talbert
05/25/2022, 7:21 PMShawn Talbert
05/25/2022, 7:22 PMCory Weiner
05/25/2022, 7:24 PMShawn Talbert
05/25/2022, 8:32 PMShawn Talbert
05/25/2022, 8:33 PMShawn Talbert
05/25/2022, 8:35 PMbattk
05/25/2022, 9:48 PMbattk
05/25/2022, 9:49 PMbattk
05/25/2022, 9:50 PMbattk
05/25/2022, 9:50 PM