added logging
This commit is contained in:
		| @@ -7,10 +7,12 @@ import ( | ||||
| 	"time" | ||||
|  | ||||
| 	oclib "cloud.o-forge.io/core/oc-lib" | ||||
| 	"cloud.o-forge.io/core/oc-lib/logs" | ||||
| 	"cloud.o-forge.io/core/oc-lib/models/peer" | ||||
| 	tools "cloud.o-forge.io/core/oc-lib/tools" | ||||
| ) | ||||
|  | ||||
|  | ||||
| type AdmiraltySetter struct { | ||||
| 	Id			string				// ID to identify the execution, correspond to workflow_executions id | ||||
| 	NodeName 	string	// Allows to retrieve the name of the node used for this execution on each peer {"peerId": "nodeName"} | ||||
| @@ -18,6 +20,8 @@ type AdmiraltySetter struct { | ||||
|  | ||||
| func (s *AdmiraltySetter) InitializeAdmiralty(localPeerID string,remotePeerID string) error { | ||||
| 	 | ||||
| 	logger = logs.GetLogger() | ||||
|  | ||||
| 	data := oclib.NewRequest(oclib.LibDataEnum(oclib.PEER),"",localPeerID,nil,nil).LoadOne(remotePeerID) | ||||
| 	if data.Code != 200 { | ||||
| 		logger.Error().Msg("Error while trying to instantiate remote peer " + remotePeerID) | ||||
|   | ||||
| @@ -14,6 +14,7 @@ import ( | ||||
| 	"time" | ||||
|  | ||||
| 	oclib "cloud.o-forge.io/core/oc-lib" | ||||
| 	"cloud.o-forge.io/core/oc-lib/logs" | ||||
| 	"cloud.o-forge.io/core/oc-lib/models/common/enum" | ||||
| 	"cloud.o-forge.io/core/oc-lib/models/resources" | ||||
| 	w "cloud.o-forge.io/core/oc-lib/models/workflow" | ||||
| @@ -62,6 +63,7 @@ type Spec struct { | ||||
| // TODO: found on a processing instance linked to storage | ||||
| // add s3, gcs, azure, etc if needed on a link between processing and storage | ||||
| func (b *ArgoBuilder) CreateDAG(namespace string, write bool) ( int, []string, []string, error) { | ||||
| 	logger = logs.GetLogger() | ||||
| 	fmt.Println("Creating DAG", b.OriginWorkflow.Graph.Items) | ||||
| 	// handle services by checking if there is only one processing with hostname and port | ||||
| 	firstItems, lastItems, volumes := b.createTemplates(namespace) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user