Skip to content

Commit 5714e17

Browse files
authored
remove useless input to WithPriorityEnabled (#123)
1 parent e79823b commit 5714e17

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

dbos/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func TestEnqueue(t *testing.T) {
2121

2222
// Create a priority-enabled queue with max concurrency of 1 to ensure ordering
2323
// Must be created before Launch()
24-
priorityQueue := NewWorkflowQueue(serverCtx, "priority-test-queue", WithGlobalConcurrency(1), WithPriorityEnabled(true))
24+
priorityQueue := NewWorkflowQueue(serverCtx, "priority-test-queue", WithGlobalConcurrency(1), WithPriorityEnabled())
2525

2626
// Track execution order for priority test
2727
var executionOrder []string

dbos/queue.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ func WithGlobalConcurrency(concurrency int) QueueOption {
5858

5959
// WithPriorityEnabled enables priority-based scheduling for the queue.
6060
// When enabled, workflows with lower priority numbers are executed first.
61-
func WithPriorityEnabled(enabled bool) QueueOption {
61+
func WithPriorityEnabled() QueueOption {
6262
return func(q *WorkflowQueue) {
63-
q.PriorityEnabled = enabled
63+
q.PriorityEnabled = true
6464
}
6565
}
6666

@@ -92,7 +92,7 @@ func WithMaxTasksPerIteration(maxTasks int) QueueOption {
9292
// Limit: 100,
9393
// Period: 60.0, // 100 workflows per minute
9494
// }),
95-
// dbos.WithPriorityEnabled(true),
95+
// dbos.WithPriorityEnabled(),
9696
// )
9797
//
9898
// // Enqueue workflows to this queue:

dbos/queues_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ func TestPriorityQueue(t *testing.T) {
11401140
dbosCtx := setupDBOS(t, true, true)
11411141

11421142
// Create priority-enabled queue with max concurrency of 1
1143-
priorityQueue := NewWorkflowQueue(dbosCtx, "test_queue_priority", WithGlobalConcurrency(1), WithPriorityEnabled(true))
1143+
priorityQueue := NewWorkflowQueue(dbosCtx, "test_queue_priority", WithGlobalConcurrency(1), WithPriorityEnabled())
11441144
childQueue := NewWorkflowQueue(dbosCtx, "test_queue_child")
11451145

11461146
workflowEvent := NewEvent()

0 commit comments

Comments
 (0)