test
This commit is contained in:
		@@ -60,7 +60,8 @@ func (p *PeerCache) checkPeerStatus(peerID string, appName string, caller *tools
 | 
				
			|||||||
	if meth == "" {
 | 
						if meth == "" {
 | 
				
			||||||
		return res.(*Peer), false
 | 
							return res.(*Peer), false
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	url := p.urlFormat(res.(*Peer).Url+meth, tools.PEER)              // Format the URL
 | 
						url := p.urlFormat(res.(*Peer).Url+meth, tools.PEER) // Format the URL
 | 
				
			||||||
 | 
						fmt.Println("Checking peer status on", url, "...")
 | 
				
			||||||
	state, services := api.CheckRemotePeer(url)                       // Check the status of the peer
 | 
						state, services := api.CheckRemotePeer(url)                       // Check the status of the peer
 | 
				
			||||||
	res.(*Peer).Services = services                                   // Update the services states of the peer
 | 
						res.(*Peer).Services = services                                   // Update the services states of the peer
 | 
				
			||||||
	access.UpdateOne(res, peerID)                                     // Update the peer in the db
 | 
						access.UpdateOne(res, peerID)                                     // Update the peer in the db
 | 
				
			||||||
@@ -109,6 +110,7 @@ func (p *PeerCache) LaunchPeerExecution(peerID string, dataID string,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// exec executes the method on the peer
 | 
					// exec executes the method on the peer
 | 
				
			||||||
func (p *PeerCache) exec(url string, method tools.METHOD, body map[string]interface{}, caller *tools.HTTPCaller) error {
 | 
					func (p *PeerCache) exec(url string, method tools.METHOD, body map[string]interface{}, caller *tools.HTTPCaller) error {
 | 
				
			||||||
 | 
						fmt.Println("exec", url, "...")
 | 
				
			||||||
	var b []byte
 | 
						var b []byte
 | 
				
			||||||
	var err error
 | 
						var err error
 | 
				
			||||||
	if method == tools.POST { // Execute the POST method if it's a POST method
 | 
						if method == tools.POST { // Execute the POST method if it's a POST method
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user