Added QueueWData and QueueWDataWait to cli. Added Once prop to cron (these will be removed upon execution)
This commit is contained in:
@@ -50,6 +50,11 @@ func (c *Cli) ReplayEnvAddr() string {
|
||||
func (c *Cli) ReplayEnvHomeDir() string {
|
||||
return os.Getenv("REPLAY_HOMEDIR")
|
||||
}
|
||||
|
||||
func (c *Cli) ReplayPort() string {
|
||||
return os.Getenv("REPLAY_PORT")
|
||||
}
|
||||
|
||||
func (c *Cli) ReplayEnvRepo() string {
|
||||
return os.Getenv("REPLAY_REPO")
|
||||
}
|
||||
@@ -140,6 +145,14 @@ func (c *Cli) QueueEnqueue(id uint) error {
|
||||
return c.HttpCli().JsonGet(fmt.Sprintf("/api/v1/robots/op/enqueue/%d", id), nil)
|
||||
}
|
||||
|
||||
func (c *Cli) QueueEnqueueWData(id string, bs []byte) ([]byte, error) {
|
||||
return c.HttpCli().RawPost(fmt.Sprintf("api/v1/queue/add/%s", id), bs)
|
||||
}
|
||||
|
||||
func (c *Cli) QueueEnqueueWDataWait(id string, bs []byte) ([]byte, error) {
|
||||
return c.HttpCli().RawPost(fmt.Sprintf("api/v1/queue/addwait?job=%s", id), bs)
|
||||
}
|
||||
|
||||
func (c *Cli) ServiceStopAll() error {
|
||||
return c.HttpCli().JsonGet("/api/v1/service/op/stopall", nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user