Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions health.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func RunOpsAppHealthCheck(apiKey string, orgId string) (AppHealth, error) {
}

// send the request
client := &http.Client{}
client := &http.Client{Timeout: 60 * time.Second}
resp, err := client.Do(req)
if err != nil {
log.Printf("[ERROR] Failed sending HTTP request: %s", err)
Expand Down Expand Up @@ -204,7 +204,7 @@ func RunOpsAppHealthCheck(apiKey string, orgId string) (AppHealth, error) {
req.Header.Set("Authorization", "Bearer "+apiKey)

// send the request
client = &http.Client{}
client = &http.Client{Timeout: 60 * time.Second}
resp, err = client.Do(req)
if err != nil {
log.Printf("[ERROR] Failed sending the app validate HTTP request: %s", err)
Expand Down Expand Up @@ -289,7 +289,7 @@ func RunOpsAppHealthCheck(apiKey string, orgId string) (AppHealth, error) {
req.Header.Set("Authorization", "Bearer "+apiKey)

// send the request
client = &http.Client{}
client = &http.Client{Timeout: 60 * time.Second}
resp, err = client.Do(req)
if err != nil {
log.Printf("[ERROR] Failed sending health check app verify HTTP request: %s", err)
Expand Down Expand Up @@ -336,7 +336,7 @@ func RunOpsAppHealthCheck(apiKey string, orgId string) (AppHealth, error) {
req.Header.Set("Authorization", "Bearer "+apiKey)

// send the request
client = &http.Client{}
client = &http.Client{Timeout: 60 * time.Second}
resp, err = client.Do(req)
if err != nil {
log.Printf("[ERROR] Failed sending health check app read HTTP request: %s", err)
Expand Down Expand Up @@ -400,7 +400,7 @@ func RunOpsAppHealthCheck(apiKey string, orgId string) (AppHealth, error) {
req.Header.Set("Authorization", "Bearer "+apiKey)

// send the request
client = &http.Client{}
client = &http.Client{Timeout: 60 * time.Second}
resp, err = client.Do(req)

if err != nil {
Expand Down Expand Up @@ -458,7 +458,7 @@ func RunOpsAppHealthCheck(apiKey string, orgId string) (AppHealth, error) {
req.Header.Set("Authorization", "Bearer "+apiKey)

// send the request
client = &http.Client{}
client = &http.Client{Timeout: 60 * time.Second}
resp, err = client.Do(req)

if err != nil {
Expand Down Expand Up @@ -1069,7 +1069,7 @@ func deleteOpsWorkflow(workflowHealth WorkflowHealth, apiKey string, orgId strin
req.Header.Set("Org-Id", orgId)

// send the request
client := &http.Client{}
client := &http.Client{Timeout: 60 * time.Second}
resp, err := client.Do(req)

if err != nil {
Expand Down Expand Up @@ -1276,7 +1276,7 @@ func RunOpsWorkflow(apiKey string, orgId string, cloudRunUrl string) (WorkflowHe

// send the request
startTime := time.Now()
client := &http.Client{}
client := &http.Client{Timeout: 60 * time.Second}
resp, err := client.Do(req)
if err != nil {
log.Printf("[ERROR] Failed sending health check HTTP request: %s", err)
Expand Down Expand Up @@ -1513,7 +1513,7 @@ func RunOpsAppUpload(apiKey string, orgId string) (AppHealth, error) {
req.Header.Set("Content-Type", writer.FormDataContentType())
req.Header.Set("Authorization", "Bearer "+apiKey)

client := &http.Client{}
client := &http.Client{Timeout: 60 * time.Second}
res, err := client.Do(req)
if err != nil {
log.Printf("[ERROR] Failed sending request to app upload: %s", err)
Expand Down Expand Up @@ -1580,7 +1580,7 @@ func RunOpsAppUpload(apiKey string, orgId string) (AppHealth, error) {
req.Header.Set("Authorization", "Bearer "+apiKey)

// send the request
client = &http.Client{}
client = &http.Client{Timeout: 60 * time.Second}
resp, err = client.Do(req)

if err != nil {
Expand Down Expand Up @@ -1694,7 +1694,7 @@ func RunOpsAppUpload(apiKey string, orgId string) (AppHealth, error) {
req.Header.Set("Authorization", "Bearer "+apiKey)

// send the request
client = &http.Client{}
client = &http.Client{Timeout: 60 * time.Second}
resp, err = client.Do(req)

if err != nil {
Expand Down Expand Up @@ -1785,7 +1785,7 @@ func InitOpsWorkflow(apiKey string, OrgId string) (string, error) {

log.Printf("[DEBUG] Ops dashboard user found. Setting up ops workflow")

client := &http.Client{}
client := &http.Client{Timeout: 60 * time.Second}
body := GetWorkflowTest()
if project.Environment == "cloud" {
// url := "https://shuffler.io/api/v1/workflows/602c7cf5-500e-4bd1-8a97-aa5bc8a554e6"
Expand Down Expand Up @@ -1997,7 +1997,7 @@ func InitOpsWorkflow(apiKey string, OrgId string) (string, error) {
req.Body = ioutil.NopCloser(bytes.NewBuffer(workflowDataJSON))

// send the request
client = &http.Client{}
client = &http.Client{Timeout: 60 * time.Second}
resp, err = client.Do(req)
if err != nil {
log.Printf("[ERROR] Failed sending HTTP request: %s", err)
Expand Down
Loading