mirror of
https://github.com/postmannen/ctrl.git
synced 2025-03-05 06:46:48 +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/
|
ship1/
|
||||||
ship2/
|
ship2/
|
||||||
tmp/
|
tmp/
|
||||||
incommmingBuffer.db
|
var/
|
||||||
|
./incommmingBuffer.db
|
||||||
store.log
|
store.log
|
||||||
changes.md
|
changes.md
|
||||||
steward.sock
|
steward.sock
|
||||||
|
|
20
README.md
20
README.md
|
@ -206,9 +206,9 @@ timeout
|
||||||
// Normal Resend retries
|
// Normal Resend retries
|
||||||
retries
|
retries
|
||||||
// The timeout of the new message created via a request event.
|
// The timeout of the new message created via a request event.
|
||||||
requestTimeout
|
replyTimeout
|
||||||
// The retries of the new message created via a request event.
|
// The retries of the new message created via a request event.
|
||||||
requestRetries
|
replyRetries
|
||||||
// Timeout for how long a process should be allowed to operate
|
// Timeout for how long a process should be allowed to operate
|
||||||
methodTimeout
|
methodTimeout
|
||||||
```
|
```
|
||||||
|
@ -234,9 +234,9 @@ Timeout int `json:"timeout" yaml:"timeout"`
|
||||||
// Normal Resend retries
|
// Normal Resend retries
|
||||||
Retries int `json:"retries" yaml:"retries"`
|
Retries int `json:"retries" yaml:"retries"`
|
||||||
// The timeout of the new message created via a request event.
|
// 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.
|
// 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
|
// Timeout for long a process should be allowed to operate
|
||||||
MethodTimeout int `json:"methodTimeout" yaml:"methodTimeout"`
|
MethodTimeout int `json:"methodTimeout" yaml:"methodTimeout"`
|
||||||
// Directory is a string that can be used to create the
|
// 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,
|
"timeout":3,
|
||||||
"retries":3,
|
"retries":3,
|
||||||
"requestTimeout":3,
|
"replyTimeout":3,
|
||||||
"requestRetries":3,
|
"replyRetries":3,
|
||||||
"MethodTimeout": 7
|
"MethodTimeout": 7
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -392,8 +392,8 @@ To send and Op Command to stop a subscriber on a node
|
||||||
},
|
},
|
||||||
"timeout":3,
|
"timeout":3,
|
||||||
"retries":3,
|
"retries":3,
|
||||||
"requestTimeout":3,
|
"replyTimeout":3,
|
||||||
"requestRetries":3,
|
"replyRetries":3,
|
||||||
"MethodTimeout": 7
|
"MethodTimeout": 7
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -418,8 +418,8 @@ To send and Op Command to start a subscriber on a node
|
||||||
},
|
},
|
||||||
"timeout":3,
|
"timeout":3,
|
||||||
"retries":3,
|
"retries":3,
|
||||||
"requestTimeout":3,
|
"replyTimeout":3,
|
||||||
"requestRetries":3,
|
"replyRetries":3,
|
||||||
"MethodTimeout": 7
|
"MethodTimeout": 7
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -3,10 +3,12 @@
|
||||||
"directory":"cli_command__result",
|
"directory":"cli_command__result",
|
||||||
"fileExtension": ".result",
|
"fileExtension": ".result",
|
||||||
"toNode": "ship1",
|
"toNode": "ship1",
|
||||||
"data": ["bash","-c","sleep 3 & tree ./"],
|
"data": ["bash","-c","sleep 5 & tree ./"],
|
||||||
"method":"REQCliCommand",
|
"method":"REQCliCommand",
|
||||||
"timeout":10,
|
"timeout":5,
|
||||||
"retries":3,
|
"retries":3,
|
||||||
"methodTimeout": 4
|
"replyTimeout":5,
|
||||||
|
"replyRetries":3,
|
||||||
|
"methodTimeout": 10
|
||||||
}
|
}
|
||||||
]
|
]
|
|
@ -14,8 +14,8 @@
|
||||||
},
|
},
|
||||||
"timeout":3,
|
"timeout":3,
|
||||||
"retries":3,
|
"retries":3,
|
||||||
"requestTimeout":3,
|
"replyTimeout":3,
|
||||||
"requestRetries":3,
|
"replyRetries":3,
|
||||||
"MethodTimeout": 7
|
"MethodTimeout": 7
|
||||||
}
|
}
|
||||||
]
|
]
|
|
@ -15,8 +15,8 @@
|
||||||
},
|
},
|
||||||
"timeout":3,
|
"timeout":3,
|
||||||
"retries":3,
|
"retries":3,
|
||||||
"requestTimeout":3,
|
"replyTimeout":3,
|
||||||
"requestRetries":3,
|
"replyRetries":3,
|
||||||
"MethodTimeout": 7
|
"MethodTimeout": 7
|
||||||
}
|
}
|
||||||
]
|
]
|
|
@ -10,8 +10,8 @@
|
||||||
},
|
},
|
||||||
"timeout":3,
|
"timeout":3,
|
||||||
"retries":3,
|
"retries":3,
|
||||||
"requestTimeout":3,
|
"replyTimeout":3,
|
||||||
"requestRetries":3,
|
"replyRetries":3,
|
||||||
"MethodTimeout": 7
|
"MethodTimeout": 7
|
||||||
}
|
}
|
||||||
]
|
]
|
|
@ -31,9 +31,9 @@ type Message struct {
|
||||||
// Normal Resend retries
|
// Normal Resend retries
|
||||||
Retries int `json:"retries" yaml:"retries"`
|
Retries int `json:"retries" yaml:"retries"`
|
||||||
// The timeout of the new message created via a request event.
|
// 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.
|
// 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
|
// Timeout for long a process should be allowed to operate
|
||||||
MethodTimeout int `json:"methodTimeout" yaml:"methodTimeout"`
|
MethodTimeout int `json:"methodTimeout" yaml:"methodTimeout"`
|
||||||
// Directory is a string that can be used to create the
|
// 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,
|
ToNode: message.FromNode,
|
||||||
Data: []string{string(outData)},
|
Data: []string{string(outData)},
|
||||||
Method: method,
|
Method: method,
|
||||||
Timeout: message.RequestTimeout,
|
Timeout: message.ReplyTimeout,
|
||||||
Retries: message.RequestRetries,
|
Retries: message.ReplyRetries,
|
||||||
|
|
||||||
// Put in a copy of the initial request message, so we can use it's properties if
|
// 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.
|
// 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.
|
// Open file and write data.
|
||||||
file := filepath.Join(folderTree, fileName)
|
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 {
|
if err != nil {
|
||||||
log.Printf("error: methodEventTextLogging.handler: failed to open file: %v\n", err)
|
log.Printf("error: methodEventTextLogging.handler: failed to open file: %v\n", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Add table
Reference in a new issue