From 69c93bcf85b176915e25e88b9570e4d224d92bb3 Mon Sep 17 00:00:00 2001 From: Hunter Long Date: Thu, 4 Oct 2018 23:04:26 -0700 Subject: [PATCH] checkin - statuper shell script --- core/checkin.go | 4 ++-- statuper | 41 +++++++++++++++++++++++++++-------------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/core/checkin.go b/core/checkin.go index 5d929495..5e033ccc 100644 --- a/core/checkin.go +++ b/core/checkin.go @@ -103,7 +103,7 @@ func (u *CheckinHit) Create() (int64, error) { u.CreatedAt = time.Now() } row := checkinHitsDB().Create(u) - if row.Error == nil { + if row.Error != nil { utils.Log(2, row.Error) return 0, row.Error } @@ -119,7 +119,7 @@ func SelectCheckinApi(api string) *Checkin { func (c *Checkin) CreateHit() (int64, error) { c.CreatedAt = time.Now() row := checkinDB().Create(c) - if row.Error == nil { + if row.Error != nil { utils.Log(2, row.Error) return 0, row.Error } diff --git a/statuper b/statuper index e1db7e5e..62645692 100755 --- a/statuper +++ b/statuper @@ -1,12 +1,13 @@ #!/usr/bin/env bash -VERSION="3.4.0" +VERSION="0.1" VERBOSE=false SSLOPTION=false AWSREGION="us-west-2" -US_W_1="ami-7be8a103" +US_W_1="ami-6d1ffd0e" US_W_2="ami-7be8a103" -US_E_1="ami-7be8a103" -US_E_2="ami-7be8a103" +US_E_1="ami-b3be85cc" +US_E_2="ami-cc7a40a9" +AMI_IMAGE=$US_W_2 AWS_CLI=$(which aws) DOCKER_CLI=$(which docker) DOCKER_IMG="hunterlong/statup" @@ -19,16 +20,18 @@ cat <