mirror of
https://github.com/postmannen/ctrl.git
synced 2024-12-14 12:37:31 +00:00
renamed reqestTimeout to replyTimeout
This commit is contained in:
parent
2ea53e1432
commit
b2f47d8a75
8 changed files with 28 additions and 25 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,7 +1,8 @@
|
|||
ship1/
|
||||
ship2/
|
||||
tmp/
|
||||
incommmingBuffer.db
|
||||
var/
|
||||
./incommmingBuffer.db
|
||||
store.log
|
||||
changes.md
|
||||
steward.sock
|
||||
|
|
20
README.md
20
README.md
|
@ -206,9 +206,9 @@ timeout
|
|||
// Normal Resend retries
|
||||
retries
|
||||
// The timeout of the new message created via a request event.
|
||||
requestTimeout
|
||||
replyTimeout
|
||||
// The retries of the new message created via a request event.
|
||||
requestRetries
|
||||
replyRetries
|
||||
// Timeout for how long a process should be allowed to operate
|
||||
methodTimeout
|
||||
```
|
||||
|
@ -234,9 +234,9 @@ Timeout int `json:"timeout" yaml:"timeout"`
|
|||
// Normal Resend retries
|
||||
Retries int `json:"retries" yaml:"retries"`
|
||||
// The timeout of the new message created via a request event.
|
||||
RequestTimeout int `json:"requestTimeout" yaml:"requestTimeout"`
|
||||
ReplyTimeout int `json:"replyTimeout" yaml:"replyTimeout"`
|
||||
// The retries of the new message created via a request event.
|
||||
RequestRetries int `json:"requestRetries" yaml:"requestRetries"`
|
||||
ReplyRetries int `json:"replyRetries" yaml:"replyRetries"`
|
||||
// Timeout for long a process should be allowed to operate
|
||||
MethodTimeout int `json:"methodTimeout" yaml:"methodTimeout"`
|
||||
// Directory is a string that can be used to create the
|
||||
|
@ -365,8 +365,8 @@ To send a Op Command message for process listing with custom timeout and amount
|
|||
},
|
||||
"timeout":3,
|
||||
"retries":3,
|
||||
"requestTimeout":3,
|
||||
"requestRetries":3,
|
||||
"replyTimeout":3,
|
||||
"replyRetries":3,
|
||||
"MethodTimeout": 7
|
||||
}
|
||||
]
|
||||
|
@ -392,8 +392,8 @@ To send and Op Command to stop a subscriber on a node
|
|||
},
|
||||
"timeout":3,
|
||||
"retries":3,
|
||||
"requestTimeout":3,
|
||||
"requestRetries":3,
|
||||
"replyTimeout":3,
|
||||
"replyRetries":3,
|
||||
"MethodTimeout": 7
|
||||
}
|
||||
]
|
||||
|
@ -418,8 +418,8 @@ To send and Op Command to start a subscriber on a node
|
|||
},
|
||||
"timeout":3,
|
||||
"retries":3,
|
||||
"requestTimeout":3,
|
||||
"requestRetries":3,
|
||||
"replyTimeout":3,
|
||||
"replyRetries":3,
|
||||
"MethodTimeout": 7
|
||||
}
|
||||
]
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
"directory":"cli_command__result",
|
||||
"fileExtension": ".result",
|
||||
"toNode": "ship1",
|
||||
"data": ["bash","-c","sleep 3 & tree ./"],
|
||||
"data": ["bash","-c","sleep 5 & tree ./"],
|
||||
"method":"REQCliCommand",
|
||||
"timeout":10,
|
||||
"timeout":5,
|
||||
"retries":3,
|
||||
"methodTimeout": 4
|
||||
"replyTimeout":5,
|
||||
"replyRetries":3,
|
||||
"methodTimeout": 10
|
||||
}
|
||||
]
|
|
@ -14,8 +14,8 @@
|
|||
},
|
||||
"timeout":3,
|
||||
"retries":3,
|
||||
"requestTimeout":3,
|
||||
"requestRetries":3,
|
||||
"replyTimeout":3,
|
||||
"replyRetries":3,
|
||||
"MethodTimeout": 7
|
||||
}
|
||||
]
|
|
@ -15,8 +15,8 @@
|
|||
},
|
||||
"timeout":3,
|
||||
"retries":3,
|
||||
"requestTimeout":3,
|
||||
"requestRetries":3,
|
||||
"replyTimeout":3,
|
||||
"replyRetries":3,
|
||||
"MethodTimeout": 7
|
||||
}
|
||||
]
|
|
@ -10,8 +10,8 @@
|
|||
},
|
||||
"timeout":3,
|
||||
"retries":3,
|
||||
"requestTimeout":3,
|
||||
"requestRetries":3,
|
||||
"replyTimeout":3,
|
||||
"replyRetries":3,
|
||||
"MethodTimeout": 7
|
||||
}
|
||||
]
|
|
@ -31,9 +31,9 @@ type Message struct {
|
|||
// Normal Resend retries
|
||||
Retries int `json:"retries" yaml:"retries"`
|
||||
// The timeout of the new message created via a request event.
|
||||
RequestTimeout int `json:"requestTimeout" yaml:"requestTimeout"`
|
||||
ReplyTimeout int `json:"replyTimeout" yaml:"replyTimeout"`
|
||||
// The retries of the new message created via a request event.
|
||||
RequestRetries int `json:"requestRetries" yaml:"requestRetries"`
|
||||
ReplyRetries int `json:"replyRetries" yaml:"replyRetries"`
|
||||
// Timeout for long a process should be allowed to operate
|
||||
MethodTimeout int `json:"methodTimeout" yaml:"methodTimeout"`
|
||||
// Directory is a string that can be used to create the
|
||||
|
|
|
@ -397,8 +397,8 @@ func newReplyMessage(proc process, message Message, method Method, outData []byt
|
|||
ToNode: message.FromNode,
|
||||
Data: []string{string(outData)},
|
||||
Method: method,
|
||||
Timeout: message.RequestTimeout,
|
||||
Retries: message.RequestRetries,
|
||||
Timeout: message.ReplyTimeout,
|
||||
Retries: message.ReplyRetries,
|
||||
|
||||
// Put in a copy of the initial request message, so we can use it's properties if
|
||||
// needed to for example create the file structure naming on the subscriber.
|
||||
|
@ -600,7 +600,7 @@ func (m methodREQErrorLog) handler(proc process, message Message, node string) (
|
|||
|
||||
// Open file and write data.
|
||||
file := filepath.Join(folderTree, fileName)
|
||||
f, err := os.OpenFile(file, os.O_APPEND|os.O_RDWR|os.O_CREATE, os.ModeAppend)
|
||||
f, err := os.OpenFile(file, os.O_APPEND|os.O_RDWR|os.O_CREATE|os.O_SYNC, os.ModeAppend)
|
||||
if err != nil {
|
||||
log.Printf("error: methodEventTextLogging.handler: failed to open file: %v\n", err)
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in a new issue