예제 #1
0
파일: context.go 프로젝트: justintung/flynn
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)
}
예제 #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)
}