Add Email-Forwarder watch container
This commit is contained in:
parent
88e82286d8
commit
ba53f8bb19
5 changed files with 36 additions and 10 deletions
4
main.go
4
main.go
|
|
@ -7,6 +7,7 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"emailforwarder/backend"
|
||||
)
|
||||
|
|
@ -17,6 +18,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)")
|
||||
watchInterval := flag.Duration("watch-interval", 60*time.Second, "Pause zwischen Watch-Durchlaeufen")
|
||||
seedAccount := flag.String("seed-account", "", "Konto aus lokaler JSON-Datei in die DB schreiben (nur CLI/Test)")
|
||||
checkAccount := flag.String("check-account", "", "Konto-Logins pruefen und INBOX zaehlen, ohne zu kopieren")
|
||||
flag.Parse()
|
||||
|
|
@ -42,7 +44,7 @@ func main() {
|
|||
|
||||
// CLI-Modus: ohne Web laufen lassen (Cronjob / Cutover).
|
||||
if *runOnce != "" {
|
||||
must(backend.RunMigration(*runOnce, *watch))
|
||||
must(backend.RunMigration(*runOnce, *watch, *watchInterval))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue