This pr resolves #37 by modifying the /clock in and /clock out to request time zone verification asynchronously, instead of polling the Slack API in real-time when processing the request. Below are highlights in this jumbo pr.
ApexJobRequestProcessJob is the batch Apex class used to asynchronously execute requested jobs
ApexJobService.submitAndProcess is used to submit an async job request and execute a new ApexJobRequestProcessJob batch if none are currently running.
SlashclockService now only supports a single getInstance(Contact) method, enforcing the need to have both a contact and an account from which to obtain Slack Team ID, Slack User ID and Time Zone values
SlackService now caches found or created contacts for faster and more reliable performance
DatetimeUtil.adjust is used to adjust the times based on differences in the assumed time zone vs. the actual time zone
This pr resolves #37 by modifying the /clock in and /clock out to request time zone verification asynchronously, instead of polling the Slack API in real-time when processing the request. Below are highlights in this jumbo pr.
ApexJobRequestProcessJob
is the batch Apex class used to asynchronously execute requested jobsApexJobService.submitAndProcess
is used to submit an async job request and execute a newApexJobRequestProcessJob
batch if none are currently running.SlashclockService
now only supports a singlegetInstance(Contact)
method, enforcing the need to have both a contact and an account from which to obtain Slack Team ID, Slack User ID and Time Zone valuesSlackService
now caches found or created contacts for faster and more reliable performanceDatetimeUtil.adjust
is used to adjust the times based on differences in the assumed time zone vs. the actual time zone