Skip to content

Commit

Permalink
feat: Add go mod and add get job count
Browse files Browse the repository at this point in the history
  • Loading branch information
LyricTian committed Apr 12, 2022
1 parent 8f19abe commit 308732a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@

# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/

.vscode
4 changes: 4 additions & 0 deletions chan_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,7 @@ func (q *Queue) Push(job Jober) {
q.wg.Add(1)
q.jobQueue <- job
}

func (q *Queue) GetJobCount() int {
return len(q.jobQueue)
}
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/LyricTian/queue

go 1.17

0 comments on commit 308732a

Please sign in to comment.