-
Notifications
You must be signed in to change notification settings - Fork 773
Conversation
Signed-off-by: 玉海 <[email protected]>
Signed-off-by: 玉海 <[email protected]>
Signed-off-by: 玉海 <[email protected]>
Signed-off-by: 玉海 <[email protected]>
@jim3ma PTAL. Thanks. |
@@ -60,8 +61,8 @@ func (s *Server) getPreheatTask(ctx context.Context, rw http.ResponseWriter, req | |||
} | |||
resp := types.PreheatInfo{ | |||
ID: task.ID, | |||
FinishTime: strfmt.NewDateTime(), | |||
StartTime: strfmt.NewDateTime(), | |||
FinishTime: strfmt.DateTime(time.Unix(task.FinishTime/1000, task.FinishTime%1000*int64(time.Millisecond)).UTC()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change type of FinishTime
form int64 to time.Time? WDYT? So do with StartTime.
) | ||
|
||
const( | ||
EXPIRED_TIME = 7 * 24 * 3600 * 1000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a comment here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
} | ||
|
||
func(r *PreheatTaskRepository) load() { | ||
r.loaded.Do(func(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
|
||
func init() { | ||
RegisterPreheater("file", &FilePreheat{BasePreheater:new(BasePreheater)}) | ||
logrus.StandardLogger().SetLevel(logrus.DebugLevel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test code?
} | ||
|
||
func (svc *PreheatService) createCommand(url string, header map[string]string, filter, identifier, tmpTarget string) *exec.Cmd { | ||
netRate := 50 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't use magic numbers? It is easy to make others confused.
Signed-off-by: 玉海 <[email protected]>
Signed-off-by: 玉海 <[email protected]>
agree |
add preheat implements
No description provided.