Add longPoll parameter to CheckForMessages function
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is failing
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	continuous-integration/drone/push Build is failing
				
			This commit is contained in:
		@@ -27,7 +27,7 @@ type ReceivedMessage struct {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// CheckForMessages checks for messages on a single server
 | 
			
		||||
func CheckForMessages(storage_path string, job *client.RequestsJob, timeout int) (int, string, error) {
 | 
			
		||||
func CheckForMessages(storage_path string, job *client.RequestsJob, timeout int, longPoll bool) (int, string, error) {
 | 
			
		||||
 | 
			
		||||
	count := 0
 | 
			
		||||
 | 
			
		||||
@@ -63,6 +63,11 @@ func CheckForMessages(storage_path string, job *client.RequestsJob, timeout int)
 | 
			
		||||
		var toSrv meowlib.ToServerMessage
 | 
			
		||||
		toSrv.PullRequest = crl
 | 
			
		||||
		toSrv.From = job.Server.UserKp.Public
 | 
			
		||||
 | 
			
		||||
		if longPoll {
 | 
			
		||||
			toSrv.Timeout = int64(timeout)
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		data, err := job.Server.ProcessOutboundMessage(&toSrv)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return -1, "CheckMessages: ProcessOutboundMessage", err
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user