fix(cmd): do not initialize asnyc operations when running certain cli commands
This commit is contained in:
@ -33,7 +33,7 @@ var dumpCmd = &cobra.Command{
|
||||
Use: "dump",
|
||||
Short: "Dump all vikunja data into a zip file. Includes config, files and db.",
|
||||
PreRun: func(cmd *cobra.Command, args []string) {
|
||||
initialize.FullInit()
|
||||
initialize.FullInitWithoutAsync()
|
||||
},
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
filename := "vikunja-dump_" + time.Now().Format("2006-01-02_15-03-05") + ".zip"
|
||||
|
@ -32,7 +32,7 @@ var indexCmd = &cobra.Command{
|
||||
Use: "index",
|
||||
Short: "Reindex all of Vikunja's data into Typesense. This will remove any existing index.",
|
||||
PreRun: func(cmd *cobra.Command, args []string) {
|
||||
initialize.FullInit()
|
||||
initialize.FullInitWithoutAsync()
|
||||
},
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if !config.TypesenseEnabled.GetBool() {
|
||||
|
@ -32,7 +32,7 @@ var restoreCmd = &cobra.Command{
|
||||
Short: "Restores all vikunja data from a vikunja dump.",
|
||||
Args: cobra.ExactArgs(1),
|
||||
PreRun: func(cmd *cobra.Command, args []string) {
|
||||
initialize.FullInit()
|
||||
initialize.FullInitWithoutAsync()
|
||||
},
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if err := dump.Restore(args[0]); err != nil {
|
||||
|
Reference in New Issue
Block a user