updates on the order bulk fix
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
"doormile/constants"
|
||||
"doormile/db"
|
||||
"doormile/internal/assignment"
|
||||
"doormile/internal/notify"
|
||||
"doormile/models"
|
||||
"doormile/utils"
|
||||
@@ -66,6 +67,12 @@ func MilerStartDuty(c *fiber.Ctx) error {
|
||||
// location ping. Skipped when the app sent no coordinates.
|
||||
indexMilerLocation(milerUserID, req.Lat, req.Lon)
|
||||
|
||||
// Give the pending orders around them to this rider now, rather than at
|
||||
// the next periodic sweep (balanced assignment, Phase B).
|
||||
if req.Lat != 0 && req.Lon != 0 {
|
||||
go assignment.SweepNear(req.Lat, req.Lon)
|
||||
}
|
||||
|
||||
return utils.OK(c, fiber.Map{
|
||||
"dutylogid": dutyLog.Dutylogid,
|
||||
"loginat": dutyLog.Loginat,
|
||||
|
||||
Reference in New Issue
Block a user