feat: Add codersdk.NullTime, change workspace build deadline (#3552)

Fixes #2015

Co-authored-by: Joe Previte <jjprevite@gmail.com>
This commit is contained in:
Mathias Fredriksson
2022-08-25 19:10:42 +03:00
committed by GitHub
co-authored by Joe Previte
parent a21a6d2f4a
commit 78a24941fe
18 changed files with 271 additions and 63 deletions
+5 -3
View File
@@ -33,8 +33,10 @@ import (
"github.com/coder/coder/peer/peerwg"
)
var workspacePollInterval = time.Minute
var autostopNotifyCountdown = []time.Duration{30 * time.Minute}
var (
workspacePollInterval = time.Minute
autostopNotifyCountdown = []time.Duration{30 * time.Minute}
)
func ssh() *cobra.Command {
var (
@@ -385,7 +387,7 @@ func notifyCondition(ctx context.Context, client *codersdk.Client, workspaceID u
return time.Time{}, nil
}
deadline = ws.LatestBuild.Deadline
deadline = ws.LatestBuild.Deadline.Time
callback = func() {
ttl := deadline.Sub(now)
var title, body string