Skip to content

Commit

Permalink
Just report error on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Castell committed Dec 28, 2015
1 parent 46b8fe6 commit 9253168
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dkron/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,12 @@ func (r *RPCServer) ExecutionDone(execution Execution, reply *serf.NodeResponse)
log.Error(ErrExecutionDoneForDeletedJob)
return ErrExecutionDoneForDeletedJob
}
log.Fatal(err)
log.Fatal("rpc:", err)
return err
}

// Save the new execution to store
if _, err := r.agent.store.SetExecution(&execution); err != nil {
log.Fatal(err)
return err
}

Expand All @@ -51,7 +50,7 @@ func (r *RPCServer) ExecutionDone(execution Execution, reply *serf.NodeResponse)
}

if err := r.agent.store.SetJob(job); err != nil {
log.Fatal(err)
log.Fatal("rpc:", err)
}

exg, err := r.agent.store.GetExecutionGroup(&execution)
Expand Down Expand Up @@ -104,7 +103,7 @@ func listenRPC(a *AgentCommand) {

l, e := net.Listen("tcp", a.getRPCAddr())
if e != nil {
log.Fatal("listen error:", e)
log.Fatal("rpc:", e)
}
go http.Serve(l, nil)
}
Expand Down

0 comments on commit 9253168

Please sign in to comment.