emptyOfflineQueue ends up completing before setOnline so when a user comes on at 8am and there are tickets waiting, they don't get assigned until the next pass 15 minutes later.
Possible solutions: move into it's own cron with a different timing or use setTimeout() to introduce a delay on this function. A few seconds should be sufficient, can probably wait a full minute for safety though.
emptyOfflineQueue ends up completing before setOnline so when a user comes on at 8am and there are tickets waiting, they don't get assigned until the next pass 15 minutes later. Possible solutions: move into it's own cron with a different timing or use setTimeout() to introduce a delay on this function. A few seconds should be sufficient, can probably wait a full minute for safety though.
https://github.com/rcmaples/shftr/blob/d9da3f5bafdd3378f1c55702180bd2b0c8fc9d6a/server.js#L68-L68