Created
October 30, 2014 17:04
-
-
Save jakul/a6d31044044967ab8b71 to your computer and use it in GitHub Desktop.
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
# A batch function which does the ordering and sends an announcement with (all) the ordered job ids in | |
# A function receives that announcment and processes the first job from that list | |
# Each processed job needs to know | |
# * the number of invites sent for that job today | |
# * the number of invites sent to each locum today | |
# While the job doesn't have enough invitations | |
# While there are locums to try to match | |
# Sum up the number of sent invites for this locum and hte number of potential invites waiting to be sent and exit if that number is too high | |
# Try to match the locum to job | |
# Create entry in mongo if the locum matches | |
# Increment the number of invites for this job today |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment