Exemple #1
0
func (c *context) createDeploymentEvent(e ct.DeploymentEvent) error {
	if e.Status == "" {
		e.Status = "running"
	}
	data, err := json.Marshal(e)
	if err != nil {
		return err
	}
	query := "INSERT INTO events (app_id, object_id, object_type, data) VALUES ($1, $2, $3, $4)"
	return c.execWithRetries(query, e.AppID, e.DeploymentID, string(ct.EventTypeDeployment), data)
}
Exemple #2
0
func (c *context) createDeploymentEvent(e ct.DeploymentEvent) error {
	if e.Status == "" {
		e.Status = "running"
	}
	return c.execWithRetries("event_insert", e.AppID, e.DeploymentID, string(ct.EventTypeDeployment), e)
}