Skip to content

Commit 48d21ef

Browse files
authored
chore: add comments (#4534)
1 parent 28a001c commit 48d21ef

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/proc/shutdown.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ import (
1414
)
1515

1616
const (
17+
// defaultWrapUpTime is the default time to wait before calling wrap up listeners.
1718
defaultWrapUpTime = time.Second
18-
// why we use 5500 milliseconds is because most of our queue are blocking mode with 5 seconds
19+
// defaultWaitTime is the default time to wait before force quitting.
20+
// why we use 5500 milliseconds is because most of our queues are blocking mode with 5 seconds
1921
defaultWaitTime = 5500 * time.Millisecond
2022
)
2123

@@ -29,8 +31,10 @@ var (
2931

3032
// ShutdownConf defines the shutdown configuration for the process.
3133
type ShutdownConf struct {
34+
// WrapUpTime is the time to wait before calling shutdown listeners.
3235
WrapUpTime time.Duration `json:",default=1s"`
33-
WaitTime time.Duration `json:",default=5.5s"`
36+
// WaitTime is the time to wait before force quitting.
37+
WaitTime time.Duration `json:",default=5.5s"`
3438
}
3539

3640
// AddShutdownListener adds fn as a shutdown listener.

0 commit comments

Comments
 (0)