6 Commits
v0.1.0 ... main

Author SHA1 Message Date
Matt Jadud
596196cdc0 Updating references
Given that there is an issue over a year old on the original repo, I'm
forking it so I can use/update it.
2025-11-30 15:39:20 -05:00
c4b7b8ffe1 Delete .github/workflows/go.yml 2025-11-30 20:37:28 +00:00
3f639fe803 Update go.mod
Some checks failed
Go / build (push) Has been cancelled
2025-11-30 20:33:10 +00:00
Seb
a0757c7ec6 pool size of 1 2024-02-20 16:10:55 -08:00
Seb
043c5c2703 license 2024-02-20 09:51:23 -08:00
Sebastien Armand
8c4c128a68 setup github actions for tests 2024-02-15 21:51:18 -08:00
6 changed files with 30 additions and 9 deletions

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 Sebastien Armand
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 the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -14,14 +14,14 @@ liteq allows to run tens of thousands of jobs per second if needed. It can also
### Install
```sh
go get github.com/khepin/liteq
go get git.jadud.com/jadudm/liteq
```
### Setup and DB creation
```go
import (
"github.com/khepin/liteq"
"git.jadud.com/jadudmliteq"
_ "github.com/mattn/go-sqlite3"
)

View File

@@ -7,7 +7,7 @@ import (
"math/rand"
"time"
"github.com/khepin/liteq"
"git.jadud.com/jadudm/liteq"
_ "github.com/mattn/go-sqlite3"
)

2
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/khepin/liteq
module git.jadud.com/jadudm/liteq
go 1.22.0

View File

@@ -9,7 +9,7 @@ import (
"testing"
"time"
"github.com/khepin/liteq/internal"
"git.jadud.com/jadudm/liteq/internal"
"github.com/matryer/is"
_ "github.com/mattn/go-sqlite3"
)
@@ -224,7 +224,7 @@ func Test_Consume(t *testing.T) {
go func() {
jqueue.Consume(ctx, internal.ConsumeParams{
Queue: "q1",
PoolSize: 10,
PoolSize: 1,
Worker: func(ctx context.Context, job *internal.Job) error {
q1 <- job.Job
if job.Job == "q1-99" {
@@ -243,7 +243,7 @@ func Test_Consume(t *testing.T) {
go func() {
jqueue.Consume(ctx2, internal.ConsumeParams{
Queue: "q2",
PoolSize: 7,
PoolSize: 1,
Worker: func(ctx context.Context, job *internal.Job) error {
q2 <- job.Job
if job.Job == "q2-99" {
@@ -357,7 +357,7 @@ func Test_VisibilityTimeout(t *testing.T) {
go func() {
jqueue.Consume(ctx, internal.ConsumeParams{
Queue: "",
PoolSize: 6,
PoolSize: 1,
VisibilityTimeout: 1,
OnEmptySleep: 100 * time.Millisecond,
Worker: func(ctx context.Context, job *internal.Job) error {

View File

@@ -4,7 +4,7 @@ import (
"context"
"database/sql"
"github.com/khepin/liteq/internal"
"git.jadud.com/jadudm/liteq/internal"
)
// Creates the db file with the tables and indexes