Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e352abe
Refactor with a more modular design
shashankmehra Jun 15, 2025
6dda7c5
Separate out job interface implementation to serializer (#1)
shashankmehra Jun 18, 2025
22f0d48
implement serializer for sneakers job (#2)
shrooot Jun 20, 2025
3883fc2
Fix ACK issue (#4)
shrooot Jun 20, 2025
1318dd1
Delete unnecessary main.go. Add doc.go back and modify it. Remove pkg…
shashankmehra Jun 23, 2025
6625344
Clean up deprecated code
shashankmehra Jun 23, 2025
975c1ab
Add function Run to the engine to make it easy to handle graceful shu…
shashankmehra Jun 24, 2025
da8d0d9
Remove the rabbitmq statistics implementation
shashankmehra Jun 24, 2025
4224e1e
Rename redis stats to resque stats
shashankmehra Jun 24, 2025
0b81f86
Add pre-configured engines for resque and sneakers
shashankmehra Jun 24, 2025
c9113b2
Add basic and advanced examples for each engine and improve documenta…
shashankmehra Jun 24, 2025
b7bbafa
Remove interfaces package for a more idiomatic approach to interfaces
shashankmehra Jun 24, 2025
5ae9e32
Consolidate redis connection utils to an internal package
shashankmehra Jun 24, 2025
fe7ee55
Give serializers appropriate names
shashankmehra Jun 24, 2025
28eb8ca
Improve error handling and reporting
shashankmehra Jun 24, 2025
3317a4b
Add tests and improve code
shashankmehra Jun 25, 2025
4cbd3c4
Prepare project for a rename
shashankmehra Jun 25, 2025
82c1630
Remove memory broker. Its not required.
shashankmehra Jun 25, 2025
0518371
nit
shashankmehra Jun 25, 2025
132c71d
Fix GitHub Actions imports check
shashankmehra Jun 25, 2025
4468879
Fix test command to run tests in all subdirectories
shashankmehra Jun 25, 2025
67e5737
Improve CI pipeline
shashankmehra Jun 25, 2025
5eb1008
Remove accidental commit
shashankmehra Jun 25, 2025
2d322d7
Fix linter errors and improve statistics interface
shashankmehra Jun 25, 2025
0845e0b
Fix lint config
shashankmehra Jun 25, 2025
1a7ba76
Fix static code errors
shashankmehra Jun 25, 2025
1a6ba4f
new lines
shashankmehra Jun 25, 2025
e464215
fix: populate WorkerInfo.Queues by passing queue info to workers
shashankmehra Jun 25, 2025
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
156 changes: 96 additions & 60 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,96 +12,132 @@ jobs:
strategy:
matrix:
go:
- "1.12"
- "1.13"
- "1.14"
- "1.15"
redis-version:
- 4
- 5
- 6
- "1.21"
- "1.22"
- "1.23"
- "1.24"
broker:
- type: redis
redis-version: 6
- type: redis
redis-version: 7
- type: rabbitmq
rabbitmq-version: "3.12"
- type: rabbitmq
rabbitmq-version: "3.13"

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Setup Redis
if: matrix.broker.type == 'redis'
uses: supercharge/[email protected]
with:
redis-version: ${{ matrix.redis-version }}
redis-version: ${{ matrix.broker.redis-version }}

- name: Setup RabbitMQ
if: matrix.broker.type == 'rabbitmq'
uses: mer-team/[email protected]
with:
RABBITMQ_TAG: ${{ matrix.broker.rabbitmq-version }}

- name: Build
run: go build -v .
run: go build -v ./...

- name: Test
run: go test -v .
run: go test -v ./...

imports:
name: Imports
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: check
uses: grandcolline/[email protected]
- name: Check out code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.24'

- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest

- name: Check imports
run: |
if [ "$(goimports -l . | wc -l)" -gt 0 ]; then
echo "The following files need goimports formatting:"
goimports -l .
echo "Run 'goimports -w .' to fix"
exit 1
fi

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.24'

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest

staticcheck:
name: StaticCheck
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
run: imports
token: ${{ secrets.GITHUB_TOKEN }}
go-version: '1.24'

## Checks to be enabled in the future:
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest

- name: Run staticcheck
run: staticcheck ./...

## Additional checks that can be enabled if needed:

# errcheck:
# name: Errcheck
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - name: check
# uses: grandcolline/[email protected]
# with:
# run: errcheck
# token: ${{ secrets.GITHUB_TOKEN }}
# lint:
# name: Lint
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - name: check
# uses: grandcolline/[email protected]
# with:
# run: lint
# token: ${{ secrets.GITHUB_TOKEN }}
# shadow:
# name: Shadow
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - name: check
# uses: grandcolline/[email protected]
# - uses: actions/checkout@v4
# - name: Setup Go
# uses: actions/setup-go@v5
# with:
# run: shadow
# token: ${{ secrets.GITHUB_TOKEN }}
# staticcheck:
# name: StaticCheck
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - name: check
# uses: grandcolline/[email protected]
# with:
# run: staticcheck
# token: ${{ secrets.GITHUB_TOKEN }}
# go-version: '1.24'
# - name: Install errcheck
# run: go install github.com/kisielk/errcheck@latest
# - name: Run errcheck
# run: errcheck ./...

# sec:
# name: Sec
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - name: check
# uses: grandcolline/[email protected]
# - uses: actions/checkout@v4
# - name: Setup Go
# uses: actions/setup-go@v5
# with:
# run: sec
# token: ${{ secrets.GITHUB_TOKEN }}
# # flags: "-exclude=G104"
# go-version: '1.24'
# - name: Install gosec
# run: go install github.com/securego/gosec/v2/cmd/gosec@latest
# - name: Run gosec
# run: gosec ./...
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Code coverage profiles and other test artifacts
*.out
coverage.*
*.coverprofile
profile.cov

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
go.work
go.work.sum

# env file
.env

# Editor/IDE
# .idea/
# .vscode/

# OS-generated files
.DS_Store
11 changes: 11 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
linters-settings:
errcheck:
exclude-functions:
- (github.com/cihub/seelog.LoggerInterface).Errorf
- (github.com/cihub/seelog.LoggerInterface).Error
- (github.com/cihub/seelog.LoggerInterface).Infof
- (github.com/cihub/seelog.LoggerInterface).Info
- (github.com/cihub/seelog.LoggerInterface).Debugf
- (github.com/cihub/seelog.LoggerInterface).Debug
- (github.com/cihub/seelog.LoggerInterface).Warnf
- (github.com/cihub/seelog.LoggerInterface).Warn
6 changes: 5 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
The MIT License (MIT)

Copyright (c) 2013 Benjamin Manns
Original goworker Copyright (c) 2013 Benjamin Manns
goworker2 Copyright (c) 2024 BranchIntl

This project is a complete rewrite and modernization of the original goworker
library by Benjamin Manns (https://github.com/benmanns/goworker).

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
Loading