From eaa7cd9b717c80758d78b8fbe9912ee3585aba9a Mon Sep 17 00:00:00 2001 From: Victor Castell Date: Thu, 11 Jun 2015 23:10:47 +0200 Subject: [PATCH] Just log when there's no job key --- dcron/etcd.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dcron/etcd.go b/dcron/etcd.go index cbdaa4bf7..c29831fdf 100644 --- a/dcron/etcd.go +++ b/dcron/etcd.go @@ -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 }