new oclib match
This commit is contained in:
@@ -29,7 +29,7 @@ type PeerCache struct {
|
||||
|
||||
// urlFormat formats the URL of the peer with the data type API function
|
||||
func urlFormat(hostUrl string, dt tools.DataType) string {
|
||||
return hostUrl + "/" + strings.ReplaceAll(dt.API(), "oc-", "")
|
||||
return hostUrl + "/" + strings.ReplaceAll(dt.String(), "oc-", "")
|
||||
}
|
||||
|
||||
// checkPeerStatus checks the status of a peer
|
||||
@@ -62,7 +62,7 @@ func (p *PeerCache) LaunchPeerExecution(peerID string, dataID string,
|
||||
url := ""
|
||||
|
||||
// Check the status of the peer
|
||||
if mypeer, ok := CheckPeerStatus(peerID, dt.API()); !ok && mypeer != nil {
|
||||
if mypeer, ok := CheckPeerStatus(peerID, dt.String()); !ok && mypeer != nil {
|
||||
// If the peer is not reachable, add the execution to the failed executions list
|
||||
pexec := &PeerExecution{
|
||||
Method: method.String(),
|
||||
|
||||
Reference in New Issue
Block a user