Skip to content

Commit

Permalink
update deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouop0 committed Sep 20, 2024
1 parent 3761cef commit bb9193e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
14 changes: 14 additions & 0 deletions deploy/start.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/bin/bash

# Install yq if not already installed
if ! [ -x "$(command -v yq)" ]; then
echo 'Error: yq is not installed. Installing yq...' >&2
if [ -x "$(command -v brew)" ]; then
brew install yq
elif [ -x "$(command -v apt)" ]; then
sudo apt update
sudo apt install yq
else
echo 'Error: Package manager not found. Please install yq manually.' >&2
exit 1
fi
fi

docker-compose -f docker-compose.yml up -d

sleep 5
Expand Down
3 changes: 0 additions & 3 deletions internal/handler/syncDispute.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,17 @@ func SyncDispute(ctx *svc.ServiceContext) {
err = HandlePendingEvent(ctx, event)
if err != nil {
log.Errorf("[Handler.SyncEvent] HandlePendingBlock err: %s\n", errors.WithStack(err))
time.Sleep(500 * time.Millisecond)
}
} else if event.Status == schema.EventRollback {
// event.status=rollback & block.status=invalid
err = HandleRollbackEvent(ctx, event)
if err != nil {
log.Errorf("[Handler.SyncEvent] HandleRollbackBlock err: %s\n", errors.WithStack(err))
time.Sleep(500 * time.Millisecond)
}
}
}(&wg, ctx, event)
}
wg.Wait()
time.Sleep(3 * time.Second)
}
}

Expand Down

0 comments on commit bb9193e

Please sign in to comment.