ontology

package
v0.0.0-...-d59ed34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2023 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LoadOntoCmd = &cobra.Command{
	Use:   "load-ontology",
	Short: "run ontology load command as a kubernetes job in the cluster",
	Args:  cobra.NoArgs,
	RunE: func(cmd *cobra.Command, args []string) error {
		labels := cliJob.MetaLabel()
		labels["subcommand"] = "load-ontology"
		for _, dbname := range viper.GetStringSlice("databases") {
			bucketPath, _ := cmd.Flags().GetString("s3-bucket-path-prefix")
			job, err := cliJob.Run(
				cmd,
				labels,
				LoadCommand(dbname, fmt.Sprintf("%s/%s", bucketPath, dbname)),
			)
			if err != nil {
				return errors.Errorf("error in running job %s in database %s", err, dbname)
			}
			registry.GetLogger().Infof("deployed job %s in database %s", job.Name, dbname)
		}

		return nil
	},
}
View Source
var RefreshCmd = &cobra.Command{
	Use:   "refresh-ontology",
	Short: "run ontology refresh command as a kubernetes job in the cluster",
	Args:  cobra.NoArgs,
	RunE: func(cmd *cobra.Command, args []string) error {
		labels := cliJob.MetaLabel()
		labels["subcommand"] = "refresh-ontology"
		job, err := cliJob.Run(cmd, labels, RefreshCommand())
		if err != nil {
			return errors.Errorf("error in running job %s", err)
		}
		registry.GetLogger().Infof("deployed job %s", job.Name)
		return nil
	},
}

Functions

func LoadCommand

func LoadCommand(dbname, path string) []string

func RefreshCommand

func RefreshCommand() []string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL