updates
This commit is contained in:
@@ -140,7 +140,12 @@ func collectEligibleCandidates(nearby []redis.GeoLocation) ([]*milerCandidate, [
|
||||
continue
|
||||
}
|
||||
|
||||
if profile.Availabilitystatus != constants.MilerAvailable {
|
||||
// Carrying an order is not a reason to be skipped — maxActive below
|
||||
// is what decides how much one miler can hold. Testing for Available
|
||||
// here made that cap unreachable: a rider was eligible only while
|
||||
// idle, so activeCount was always 0 and the multi-stop round the cap
|
||||
// was written for could never be built.
|
||||
if !constants.MilerCanTakeWork(profile.Availabilitystatus) {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -152,7 +157,7 @@ func collectEligibleCandidates(nearby []redis.GeoLocation) ([]*milerCandidate, [
|
||||
}).
|
||||
Count(&activeCount)
|
||||
|
||||
if activeCount >= maxActive {
|
||||
if activeCount >= maxActiveBookings() {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user