Skip to content

Commit

Permalink
Merge pull request #22 from tinh-tinh/docs/ren/edit-readme
Browse files Browse the repository at this point in the history
docs: edit readme
  • Loading branch information
Ren0503 authored Nov 15, 2024
2 parents dbd58e0 + be53a02 commit d93ce6a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Queue for Tinh Tinh

<div>
<img alt="GitHub Release" src="https://img.shields.io/github/v/release/tinh-tinh/queue">
<img alt="GitHub License" src="https://img.shields.io/github/license/tinh-tinh/queue">
</div>


![](https://avatars.githubusercontent.com/u/178628733?s=400&u=2a8230486a43595a03a6f9f204e54a0046ce0cc4&v=4)

## Description
Expand Down
5 changes: 5 additions & 0 deletions queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,15 @@ func (q *Queue) IsLimit() bool {
}
}

// Pause stops the queue from running. When paused, the queue will not accept new
// jobs and will not run any jobs in the queue. It will resume when Resume is
// called.
func (q *Queue) Pause() {
q.running = false
}

// Resume resumes the queue from a paused state. When resumed, the queue will
// accept new jobs and run any jobs in the queue.
func (q *Queue) Resume() {
q.running = true
q.Run()
Expand Down

0 comments on commit d93ce6a

Please sign in to comment.