Esempio n. 1
0
func cmd_jobs_stop(conn *scrapinghub.Connection, args []string, flags *PFlags) {
	if len(args) < 1 {
		log.Fatalf("Missing argument: <job_id>\n")
	}
	var jobs scrapinghub.Jobs
	job_id := args[0]
	err := jobs.Stop(conn, job_id)
	if err != nil {
		log.Fatalf("stop error: %s\n", err)
	} else {
		fmt.Printf("Stopped job: %s\n", job_id)
	}
}