v1.27.0-a #10

Closed
jonathanface wants to merge 473 commits from v1.27.0-a into master
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 3ebb92a976 - Show all commits

View File

@ -313,7 +313,8 @@ func (e *TaskEngine) pollerTryAllWork() bool {
resources.CleanupMachines(e.ctx, e.db) resources.CleanupMachines(e.ctx, e.db)
} }
for _, v := range e.handlers { for _, v := range e.handlers {
if v.AssertMachineHasCapacity() != nil { if err := v.AssertMachineHasCapacity(); err != nil {
log.Debugf("skipped scheduling %s type tasks on due to %s", v.Name, err.Error())
continue continue
} }
var unownedTasks []TaskID var unownedTasks []TaskID

View File

@ -723,7 +723,7 @@ func (dbi *DBIndex) StorageBestAlloc(ctx context.Context, allocate storiface.Sec
FROM storage_path FROM storage_path
WHERE available >= $1 WHERE available >= $1
and NOW()-($2 * INTERVAL '1 second') < last_heartbeat and NOW()-($2 * INTERVAL '1 second') < last_heartbeat
and heartbeat_err is null and heartbeat_err = ''
and (($3 and can_seal = TRUE) or ($4 and can_store = TRUE)) and (($3 and can_seal = TRUE) or ($4 and can_store = TRUE))
order by (available::numeric * weight) desc`, order by (available::numeric * weight) desc`,
spaceReq, spaceReq,