Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd3c3eeb85 | ||
|
|
622e9fbc0f |
@@ -19,7 +19,7 @@ script:
|
||||
- diff -u <(echo -n) <(gofmt -d .)
|
||||
- go test -v -race ./...
|
||||
# Only build binaries from the latest Go release.
|
||||
- if [ "${LATEST}" = "true" ]; then gox -os="linux" -arch="amd64" -output="concron.." -ldflags "-X main.Rev=`git rev-parse --short HEAD`" -verbose ./src/; fi
|
||||
- if [ "${LATEST}" = "true" ]; then gox -os="linux" -arch="amd64" -output="concron" -ldflags "-X main.Rev=`git rev-parse --short HEAD`" -verbose ./src/; fi
|
||||
- ls -la
|
||||
|
||||
deploy:
|
||||
@@ -28,7 +28,7 @@ deploy:
|
||||
api_key:
|
||||
secure: Pojza+fv52KKqst90bIs8wZqGdJLzDZ/itPzxSfdWqZP4Kz/ER4hpyvT6dt1KM6UG2XRFEfySAgPfHCnop3/bvsZVCxXbFfxoU0Mz8/YeOr5sPYlh4L9THRCPYJsZmTD+EYxeLtRxn1RIVf71SUe+EH76X6jqSvXinQLqZQGshb1J+H3/0BSBHL8vwxRLQbMTgSjaD9UewUzyne1SS5fvqkb9j2QsDT5prez6FPxAZd2Ae/ILEyRN4krXMC5TRMSS1isl0TCLIXUqu6Yz8+sEzmXz4Hs9aL0/rfJ6wLJ89ib/Q+GpGH7PEQ/E1dP2+ijBBTiLDUPWFVXUeBkHxtZY67cM7OAmYrwKpFhLzv2WwXEJl7YdZJ9yK7fMwiHDQKpyC6HfvCcmvMmnQRYfnWoRZdPEDIPkW3XSxN9r1xeK9GG1a/4fGl/ELJ57NWNuLwd3OQVmnzY8fq6+zUb0N/Cv21SPpnOGFyoJ7MefCBKqyAsOtPPSbXBho4Rf2EVzwkZF67LKX4YMUzy+DrlGp/lt8DJyydVHjHBfuzBwfGLWl8dqlceasjWx6EN5RCUI9ygjftALB6xqDqWR8nBabHnubepoj/jI3XlRdG1RWmm0GkXY8AVgbfF6zvgX36gjpBdtWOAk+5iFjp+QHczsDffKSV46VcF9vwF+/Dk575nOp8=
|
||||
file:
|
||||
- concron.linux.amd64
|
||||
- concron
|
||||
on:
|
||||
repo: jar3b/concron
|
||||
tags: true
|
||||
|
||||
@@ -48,6 +48,7 @@ type Task struct {
|
||||
Deadline uint32 `yaml:"deadline"`
|
||||
UseSystemEnv *bool `yaml:"useSystemEnv,omitempty"`
|
||||
ConcurrencyPolicy string `yaml:"concurrencyPolicy"`
|
||||
ForceOutput *bool `yaml:"forceOutput,omitempty"`
|
||||
|
||||
// internal values
|
||||
envVars []string
|
||||
@@ -143,7 +144,11 @@ func (t *Task) Run() {
|
||||
select {
|
||||
case err := <-execution.stop:
|
||||
if err == nil {
|
||||
if t.ForceOutput != nil && *(t.ForceOutput) == true {
|
||||
log.Infof("[%-20s][%d] SUCCESS, took %v, output: %s", t.Name, execution.id, time.Since(execution.time), t.buf.String())
|
||||
} else {
|
||||
log.Infof("[%-20s][%d] SUCCESS, took %v", t.Name, execution.id, time.Since(execution.time))
|
||||
}
|
||||
log.Debugf("[%-20s][%d] SUCCESS, output: %s", t.Name, execution.id, t.buf.String())
|
||||
} else {
|
||||
log.Infof("[%-20s][%d] ERROR, took %v, err: %v, output: %s", t.Name, execution.id, time.Since(execution.time), err, t.buf.String())
|
||||
|
||||
Reference in New Issue
Block a user