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