Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2-1を解いた #3

Merged
merged 11 commits into from Jun 26, 2019

ログの出力が間違っていたので修正

  • Loading branch information
p1ass committed Jun 26, 2019
commit 65826258ae9f921a5c630fbe783511d49ca2dfdc
@@ -31,14 +31,14 @@ func main() {

outer:
for {
point := worker.ExecuteAllJob(interval)
worker.ExecuteAllJob(interval)

newJob, err := cli.GetJob(current)
if err != nil {
switch e := err.(type) {
case *domain.JobNotFoundError:
//TODO 送られてきたデータを見て時間のインクリメントをやめる処理を実装する
if current == time.Date(0, 1, 1, 1, 59, 59, 0, time.UTC) {
if current == time.Date(0, 1, 1, 1, 29, 59, 0, time.UTC) {
break outer
}
default:
@@ -48,10 +48,9 @@ outer:

if newJob != nil {
worker.AddJob(newJob)
point += newJob.Tasks[0]
}

l := &Log{current, point}
l := &Log{current, worker.CurrentPoint()}
logs = append(logs, l)
current = current.Add(time.Duration(interval) * time.Second)
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.