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