Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,3 @@ jobs:
go build -o /tmp/taskmasterd cmd/server/main.go
go build -o /tmp/taskmasterctl cmd/client/main.go

- name: Prepare test directory
run: mkdir -p /tmp/test_taskmaster

- name: Run tests
run: bash tests/full_test.sh
13 changes: 13 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug server",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/cmd/server",
"cwd": "${workspaceFolder}"
}
]
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.23.4
FROM golang:1.25.14
Comment thread
Archer-01 marked this conversation as resolved.

WORKDIR /app

Expand Down
11 changes: 10 additions & 1 deletion cmd/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,16 @@ func main() {
return
}

client, err := client.NewClient(setup.Socket)
socket := setup.Socket
if len(os.Args) > 1 {
socket = os.Args[1]
}
if socket == "" {
fmt.Fprintln(os.Stderr, "usage: go run ./cmd/client <socket> (path printed by taskmasterd)")
return
}

client, err := client.NewClient(socket)
if err != nil {
utils.Errorf(err.Error())
return
Expand Down
7 changes: 7 additions & 0 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package main

import (
"fmt"
"os"
"sync"

"github.com/Archer-01/taskmaster/internal/logger"
Expand All @@ -17,6 +19,11 @@ func main() {
logger.Critical(err)
}

if setup.Socket == "" {
setup.Socket = fmt.Sprintf("/tmp/taskmasterd-%d.sock", os.Getpid())
}
logger.Infof("Socket: %s", setup.Socket)

var wg sync.WaitGroup
defer wg.Wait()

Expand Down
3 changes: 3 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ services:
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
LOG_LEVEL: INFO
volumes:
- /dev/log:/dev/log
- ./taskmaster.toml:/app/taskmaster.toml
12 changes: 7 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ module github.com/Archer-01/taskmaster

go 1.23.4

require github.com/BurntSushi/toml v1.4.0 // indirect
require (
github.com/chzyer/readline v1.5.1 // indirect
golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 // indirect
)
toolchain go1.25.14

require github.com/BurntSushi/toml v1.4.0

require github.com/chzyer/readline v1.5.1

require golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 // indirect
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0=
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM=
github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ=
github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI=
github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk=
github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04=
github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8=
golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 h1:y/woIyUBFbpQGKS0u1aHF/40WUDnek3fPOyD08H5Vng=
golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Loading
Loading