Skip to content

Commit

Permalink
Just log when there's no job key
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Castell committed Jun 11, 2015
1 parent a6a053e commit eaa7cd9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dcron/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ func (e *etcdClient) SetJob(job *Job) error {
func (e *etcdClient) GetJobs() ([]*Job, error) {
res, err := e.Client.Get(keyspace+"/jobs/", true, false)
if err != nil {
eerr := err.(*etcdc.EtcdError)
if eerr.ErrorCode == 100 {
log.Info("No jobs found")
return nil, nil
}
return nil, err
}

Expand Down

0 comments on commit eaa7cd9

Please sign in to comment.