summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2020-11-09 15:19:55 +0000
committerNick White <git@njw.name>2020-11-09 15:19:55 +0000
commitc36597e65956383ec830f04e56f54158ae839a72 (patch)
tree6b3147a9f9820616f19a094ebc1444e4e2907936
parent34b5735503edb9c5ab635c84cd356f19df7d7381 (diff)
[bookpipeline] Improve interface, particularly for local use, by disabling (failing) log saving, mail sending, and removing erroneous references to AWS
-rw-r--r--cmd/bookpipeline/main.go18
1 files changed, 12 insertions, 6 deletions
diff --git a/cmd/bookpipeline/main.go b/cmd/bookpipeline/main.go
index b3ffc53..7a7a277 100644
--- a/cmd/bookpipeline/main.go
+++ b/cmd/bookpipeline/main.go
@@ -801,17 +801,20 @@ func main() {
log.Fatalln("Unknown connection type")
}
- _, err := getMailSettings()
- if err != nil {
- conn.Log("Warning: disabling email notifications as mail setting retrieval failed: ", err)
+ var err error
+ if *conntype != "local" {
+ _, err = getMailSettings()
+ if err != nil {
+ conn.Log("Warning: disabling email notifications as mail setting retrieval failed: ", err)
+ }
}
- conn.Log("Setting up AWS session")
+ conn.Log("Setting up session")
err = conn.Init()
if err != nil {
- log.Fatalln("Error setting up cloud connection:", err)
+ log.Fatalln("Error setting up connection:", err)
}
- conn.Log("Finished setting up AWS session")
+ conn.Log("Finished setting up session")
starttime := time.Now().Unix()
hostname, err := os.Hostname()
@@ -836,6 +839,9 @@ func main() {
}
shutdownIfQuiet = time.NewTimer(TimeBeforeShutdown)
savelognow = time.NewTicker(LogSaveTime)
+ if *conntype == "local" {
+ savelognow.Stop()
+ }
for {
select {