lib: Misc cleanups and new log message
This commit is contained in:
@@ -398,8 +398,7 @@ func (obj *Main) Run() error {
|
||||
}
|
||||
if err != nil {
|
||||
obj.Exit(err) // trigger exit
|
||||
continue
|
||||
//return // TODO: return or wait for exitchan?
|
||||
continue // wait for exitchan
|
||||
}
|
||||
if obj.NoWatch { // extra safety for bad GAPI's
|
||||
log.Printf("Main: GAPI stream should be quiet with NoWatch!") // fix the GAPI!
|
||||
@@ -454,6 +453,7 @@ func (obj *Main) Run() error {
|
||||
// FIXME: make sure we "UnGroup()" any semi-destructive
|
||||
// changes to the resources so our efficient GraphSync
|
||||
// will be able to re-use and cmp to the old graph.
|
||||
log.Printf("Main: GraphSync...")
|
||||
newFullGraph, err := newGraph.GraphSync(oldGraph)
|
||||
if err != nil {
|
||||
log.Printf("Config: Error running graph sync: %v", err)
|
||||
|
||||
@@ -41,6 +41,13 @@ func (obj *BaseRes) Event() error {
|
||||
|
||||
// SendEvent pushes an event into the message queue for a particular vertex.
|
||||
func (obj *BaseRes) SendEvent(ev event.EventName, err error) error {
|
||||
if obj.debug {
|
||||
if err == nil {
|
||||
log.Printf("%s[%s]: SendEvent(%+v)", obj.Kind(), obj.GetName(), ev)
|
||||
} else {
|
||||
log.Printf("%s[%s]: SendEvent(%+v): %v", obj.Kind(), obj.GetName(), ev, err)
|
||||
}
|
||||
}
|
||||
resp := event.NewResp()
|
||||
obj.mutex.Lock()
|
||||
if !obj.working {
|
||||
|
||||
Reference in New Issue
Block a user