Add CLI INBOX migration breakthrough
This commit is contained in:
parent
8a6160817b
commit
27206930f0
6 changed files with 713 additions and 43 deletions
6
main.go
6
main.go
|
|
@ -17,6 +17,7 @@ var frontend embed.FS
|
|||
func main() {
|
||||
runOnce := flag.String("run", "", "einen Umzugs-Job einmalig ausfuehren (Konto-Name oder 'all'), ohne Web-UI")
|
||||
watch := flag.Bool("watch", false, "Delta-Sync in Schleife bis Stop (Cutover-Fenster)")
|
||||
seedAccount := flag.String("seed-account", "", "Konto aus lokaler JSON-Datei in die DB schreiben (nur CLI/Test)")
|
||||
flag.Parse()
|
||||
|
||||
if err := backend.LoadConfig("config.json"); err != nil {
|
||||
|
|
@ -29,6 +30,11 @@ func main() {
|
|||
log.Fatalf("auth: %v", err)
|
||||
}
|
||||
|
||||
if *seedAccount != "" {
|
||||
must(backend.SeedAccountFromFile(*seedAccount))
|
||||
return
|
||||
}
|
||||
|
||||
// CLI-Modus: ohne Web laufen lassen (Cronjob / Cutover).
|
||||
if *runOnce != "" {
|
||||
must(backend.RunMigration(*runOnce, *watch))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue