1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2025-03-05 06:46:48 +00:00

changed folders for hello messages, and todo list

This commit is contained in:
postmannen 2021-09-08 04:11:35 +02:00
parent 1bdca9430a
commit cb0f27d48f
2 changed files with 13 additions and 11 deletions

View file

@ -650,28 +650,30 @@ For CliCommand message to a node named "ship1" of type Command and it wants an A
## TODO
Put in a limit on error messages if the central for some reason have not started errorLog, since you will be spammed with this..
### Fix bug when new flags are added to an existing config and the value is always set to 0 and not it's default
Add a set flag to the configuration so we can know if a value have been set or is a default value. We can then loop over the whole struct to check if new fields have been added and give it the appropriate default value.
### Cap the out put of the data field in the error messages, and the state log
### Put in a limit on error messages if the central for some reason have not started errorLog, since you will be spammed with this
2021/09/04 05:56:00 <--- publisher: received ACK from:errorCentral, for: REQErrorLog, data: not allowed from central
---
Services at startup of Steward. Could be implemented by having a local folder of messages to go through at startup. What is needed:
### Services at startup of Steward. Could be implemented by having a local folder of messages to go through at startup. What is needed
- A Handler that writes to this folder.
- A Handler that can check what is in this folder.
- A Handler to remove messages from this folder.
---
### A carrier type of message, that are able to forward a message on behalf of others, and are not directly ment for itself
A carrier type of message, that are able to forward a message on behalf of others, and are not directly ment for itself.
---
Look into if it makes sense to make configuration into it's own service with a go routine and channels ?
### Look into if it makes sense to make configuration into it's own service
### nACK messages like hello messages should not be stored in db for retry if failed
This can be solved by setting the retry to 1.
### Error message should also contain subject
```log

View file

@ -625,7 +625,7 @@ func (m methodREQHello) handler(proc process, message Message, node string) ([]b
data := fmt.Sprintf("%v, Received hello from %#v\n", time.Now().Format("Mon Jan _2 15:04:05 2006"), message.FromNode)
fileName := message.FileName
folderTree := filepath.Join(proc.configuration.SubscribersDataFolder, message.Directory, string(message.FromNode), string(message.Method))
folderTree := filepath.Join(proc.configuration.SubscribersDataFolder, message.Directory, string(message.FromNode))
// Check if folder structure exist, if not create it.
if _, err := os.Stat(folderTree); os.IsNotExist(err) {