瀏覽代碼

Announce read/write/delete status on startup (fixes #14)

Jakob Borg 12 年之前
父節點
當前提交
e769de9986
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      main.go

+ 8 - 1
main.go

@@ -164,8 +164,15 @@ func main() {
 	// Routine to pull blocks from other nodes to synchronize the local
 	// Routine to pull blocks from other nodes to synchronize the local
 	// repository. Does not run when we are in read only (publish only) mode.
 	// repository. Does not run when we are in read only (publish only) mode.
 	if !opts.ReadOnly {
 	if !opts.ReadOnly {
-		okln("Ready to synchronize")
+		if opts.Delete {
+			infoln("Deletes from peer nodes are allowed")
+		} else {
+			infoln("Deletes from peer nodes will be ignored")
+		}
+		okln("Ready to synchronize (read-write)")
 		m.StartRW(opts.Delete, opts.Advanced.FilesInFlight, opts.Advanced.RequestsInFlight)
 		m.StartRW(opts.Delete, opts.Advanced.FilesInFlight, opts.Advanced.RequestsInFlight)
+	} else {
+		okln("Ready to synchronize (read only; no external updates accepted)")
 	}
 	}
 
 
 	// Periodically scan the repository and update the local model.
 	// Periodically scan the repository and update the local model.