cmd

package
v0.0.0-...-52789aa Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2018 License: BSD-3-Clause Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "metronome-worker",
	Short: "Metronome worker execute jobs",
	Long: `Metronome is a distributed and fault-tolerant event scheduler built with love by ovh teams and friends in Go.
Complete documentation is available at http://ovh.github.io/metronome`,
	Run: func(cmd *cobra.Command, args []string) {
		log.Info("Metronome Worker starting")

		metrics.Serve()

		jc, err := consumers.NewJobConsumer()
		if err != nil {
			log.WithError(err).Fatal("Could not start the job consumer")
		}

		log.Info("Started")

		sigint := make(chan os.Signal, 1)
		signal.Notify(sigint, os.Interrupt)

		<-sigint

		log.Info("Shuting down")
		if err = jc.Close(); err != nil {
			log.WithError(err).Error("Could not close the job consumer")
		}
	},
}

RootCmd launch the worker agent.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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