feat: replicate threads through the observation log (#45)
feat: replicate threads through the observation log (#45) Co-authored-by: David Gwilliam <dhgwilliam@gmail.com> Co-committed-by: David Gwilliam <dhgwilliam@gmail.com>
This commit was merged in pull request #45.
This commit is contained in:
+18
-1
@@ -22,7 +22,24 @@ motivation, and in-flight knowledge development work.
|
||||
|
||||
Subcommands: create, list, link, link-entry, relate, golden, prune, rescan, close, show, note`,
|
||||
}
|
||||
cmd.AddCommand(newThreadCreateCmd(kdb))
|
||||
cmd.AddCommand(
|
||||
&cobra.Command{
|
||||
Use: "emit-all",
|
||||
Short: "Backfill thread observations so existing threads replicate",
|
||||
Long: `Backfill thread observations.
|
||||
|
||||
Threads written before replication existed have no observation, so no peer can
|
||||
learn about them. This assigns a uid to each and emits one observation per
|
||||
thread. Re-running is safe: unchanged documents dedupe.`,
|
||||
RunE: func(c *cobra.Command, args []string) error {
|
||||
n, err := kdb.EmitAllThreads()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Printf("emitted %d thread(s)\n", n)
|
||||
return nil
|
||||
},
|
||||
}, newThreadCreateCmd(kdb))
|
||||
cmd.AddCommand(newThreadAutoCmd(kdb))
|
||||
cmd.AddCommand(newThreadDraftCmd(kdb))
|
||||
cmd.AddCommand(newThreadUpdateCmd(kdb))
|
||||
|
||||
Reference in New Issue
Block a user