Created
October 25, 2018 16:51
-
-
Save vmandic/190a9ff8fdbdb3652a3eb12484d6c75a to your computer and use it in GitHub Desktop.
meds-processor, p3, s2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task<ISet<HzzoMedsDownloadDto>> Run(ISet<HzzoMedsDownloadDto> meds) | |
{ | |
await Task.WhenAll( | |
// NOTE: due to excel docs designed in different ways, we do this separation of work | |
StartLongRunning(() => ParsePrimaryListsStartingWith2014_02(meds)), | |
StartLongRunning(() => ParseSupplementaryListsStartingWith2014_02(meds)), | |
StartLongRunning(() => ParsePrimaryListsUpTo2014_01(meds)), | |
StartLongRunning(() => ParseSupplementaryListsUpTo2014_01(meds)) | |
); | |
return meds; | |
} | |
Task StartLongRunning(Action a) => | |
Task.Factory.StartNew(a, TaskCreationOptions.LongRunning); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment