Skip to content

Commit

Permalink
feat(queue): export the job queue constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
reugn committed May 11, 2024
1 parent 8017e08 commit 2d866e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions quartz/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ type jobQueue struct {

var _ JobQueue = (*jobQueue)(nil)

// newJobQueue initializes and returns an empty jobQueue.
func newJobQueue() *jobQueue {
// NewJobQueue initializes and returns an empty jobQueue.
func NewJobQueue() JobQueue {
return &jobQueue{
delegate: priorityQueue{},
}
Expand Down
2 changes: 1 addition & 1 deletion quartz/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func NewStdSchedulerWithOptions(
jobQueueMtx sync.Locker,
) *StdScheduler {
if jobQueue == nil {
jobQueue = newJobQueue()
jobQueue = NewJobQueue()
}
if jobQueueMtx == nil {
jobQueueMtx = &sync.Mutex{}
Expand Down

0 comments on commit 2d866e4

Please sign in to comment.