Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bb7f6b3878 | |||
| 41476d04a2 | |||
| a5780449fc | |||
| 4784c1c380 | |||
| 6bb1d524b9 | |||
| bcadac0f07 | |||
| 1a2087f2ee | |||
| f2069de1ec | |||
| cdc7d62440 | |||
| 5180a93ee6 | |||
| 864a130df4 | |||
| 27607eb867 | |||
| aa0782a800 | |||
| 8c879b31c2 | |||
| f5ed427dd2 |
@@ -5,7 +5,7 @@ After=syslog.target network.target
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/local/bin/ev
|
ExecStart=/usr/local/bin/ev
|
||||||
|
User=www-data
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=30
|
RestartSec=30
|
||||||
|
|
||||||
|
|||||||
@@ -10,12 +10,12 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
|
||||||
- name: Copy build to remote
|
# - name: Copy build to remote
|
||||||
ansible.builtin.copy:
|
# ansible.builtin.copy:
|
||||||
src: ev.service
|
# src: ev.service
|
||||||
dest: /etc/systemd/system/ev.service
|
# dest: /etc/systemd/system/ev.service
|
||||||
owner: root
|
# owner: root
|
||||||
group: root
|
# group: root
|
||||||
|
|
||||||
- name: Restart service
|
- name: Restart service
|
||||||
systemd:
|
systemd:
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
name: Go Bump
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
bump:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
fetch-tags: true
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: 1.21.1
|
||||||
|
|
||||||
|
- run: go install github.com/psanetra/git-semver/cli@master
|
||||||
|
|
||||||
|
- run: git tag v$(cli next --stable=false) && git push --tags || echo no change
|
||||||
|
|
||||||
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||||
+17
-15
@@ -1,28 +1,30 @@
|
|||||||
name: Go Bump
|
name: Go Bump
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# workflow_dispatch:
|
workflow_dispatch:
|
||||||
# inputs:
|
inputs:
|
||||||
# stable:
|
NAME:
|
||||||
# description: 'Stable Release'
|
description: "A random input name for the workflow"
|
||||||
# required: false
|
type: string
|
||||||
# type: boolean
|
SOME_VALUE:
|
||||||
# prerelease:
|
description: "Some other input to pass"
|
||||||
# description: 'Pre Release'
|
type: string
|
||||||
# required: false
|
|
||||||
# type: boolean
|
# push:
|
||||||
push:
|
# branches: [ "main" ]
|
||||||
branches: [ "main" ]
|
# pull_request:
|
||||||
pull_request:
|
# branches: [ "main" ]
|
||||||
branches: [ "main" ]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bump:
|
bump:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
fetch-tags: true
|
||||||
|
|
||||||
- run: echo stable=${{ inputs.stable }} pre=${{ inputs.prerelease }}
|
- run: echo stable=${{ inputs.STABLE }} pre=${{ inputs.BETA }}
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
name: Deploy
|
name: Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# push:
|
push:
|
||||||
# branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
release:
|
release:
|
||||||
types: [ published ]
|
types: [ published ]
|
||||||
|
|
||||||
@@ -11,6 +11,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
fetch-tags: true
|
||||||
|
|
||||||
- run: apt-get update && apt-get -y install ansible
|
- run: apt-get update && apt-get -y install ansible
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
tools
|
tools
|
||||||
|
tmp
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ func (s *service) getResults(w http.ResponseWriter, r *http.Request) {
|
|||||||
sort.Sort(sort.Reverse(requests))
|
sort.Sort(sort.Reverse(requests))
|
||||||
|
|
||||||
args := requestArgs(r)
|
args := requestArgs(r)
|
||||||
args.Requests = requests[:maxResults]
|
args.Requests = requests[:min(maxResults, len(requests))]
|
||||||
|
|
||||||
s.state.Use(ctx, func(ctx context.Context, state *state) error {
|
s.state.Use(ctx, func(ctx context.Context, state *state) error {
|
||||||
args.CountPeers = len(state.peers)
|
args.CountPeers = len(state.peers)
|
||||||
|
|||||||
@@ -91,17 +91,17 @@ func (s *service) Run(ctx context.Context) (err error) {
|
|||||||
subRes, e := s.es.EventStream().Subscribe(ctx, queueResults, 0)
|
subRes, e := s.es.EventStream().Subscribe(ctx, queueResults, 0)
|
||||||
errs = multierr.Append(errs, e)
|
errs = multierr.Append(errs, e)
|
||||||
|
|
||||||
|
if errs != nil {
|
||||||
|
return errs
|
||||||
|
}
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
err = multierr.Combine(subReq.Close(ctx), subRes.Close(ctx), err)
|
err = multierr.Combine(err, subReq.Close(ctx), subRes.Close(ctx))
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if errs != nil {
|
|
||||||
return errs
|
|
||||||
}
|
|
||||||
|
|
||||||
for {
|
for {
|
||||||
var events event.Events
|
var events event.Events
|
||||||
select {
|
select {
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1
|
|
||||||
Reference in New Issue
Block a user