Skip to content

Commit

Permalink
Merge pull request #1788 from tboerger/alert-refactoring
Browse files Browse the repository at this point in the history
feat: refactoring of alerts and send correct email alerts
  • Loading branch information
fiftin authored Mar 4, 2024
2 parents 7c0fed0 + dba0b8e commit 7d0bcf5
Show file tree
Hide file tree
Showing 8 changed files with 474 additions and 334 deletions.
12 changes: 9 additions & 3 deletions services/tasks/TaskRunner_logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ package tasks
import (
"bufio"
"encoding/json"
log "github.com/sirupsen/logrus"
"github.com/ansible-semaphore/semaphore/api/sockets"
"github.com/ansible-semaphore/semaphore/util"
"fmt"
"os/exec"
"time"

"github.com/ansible-semaphore/semaphore/api/sockets"
"github.com/ansible-semaphore/semaphore/util"
log "github.com/sirupsen/logrus"
)

func (t *TaskRunner) Log2(msg string, now time.Time) {
Expand Down Expand Up @@ -36,6 +38,10 @@ func (t *TaskRunner) Log(msg string) {
t.Log2(msg, time.Now())
}

func (t *TaskRunner) Logf(format string, a ...any) {
t.Log2(fmt.Sprintf(format, a...), time.Now())
}

// Readln reads from the pipe
func Readln(r *bufio.Reader) (string, error) {
var (
Expand Down
Loading

0 comments on commit 7d0bcf5

Please sign in to comment.