Add longPoll parameter to CheckForMessages function
continuous-integration/drone/push Build is failing Details

This commit is contained in:
ycc 2024-04-23 22:41:58 +02:00
parent 4dfec86279
commit 04d2b0246a
1 changed files with 6 additions and 1 deletions

View File

@ -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