Skip to content

Commit 55f17d8

Browse files
committed
refactor: rename core.QueuedMessage to core.TaskMessage throughout codebase
- Rename `core.QueuedMessage` to `core.TaskMessage` in the `work` function - Rename `core.QueuedMessage` to `core.TaskMessage` in the `run` function - Rename `core.QueuedMessage` to `core.TaskMessage` in the `tasks` channel initialization Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent f2e1e4f commit 55f17d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

queue.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func (q *Queue) queue(m *job.Message) error {
151151
return nil
152152
}
153153

154-
func (q *Queue) work(task core.QueuedMessage) {
154+
func (q *Queue) work(task core.TaskMessage) {
155155
var err error
156156
// to handle panic cases from inside the worker
157157
// in such case, we start a new goroutine
@@ -180,7 +180,7 @@ func (q *Queue) work(task core.QueuedMessage) {
180180
}
181181
}
182182

183-
func (q *Queue) run(task core.QueuedMessage) error {
183+
func (q *Queue) run(task core.TaskMessage) error {
184184
switch t := task.(type) {
185185
case *job.Message:
186186
return q.handle(t)
@@ -296,7 +296,7 @@ func (q *Queue) schedule() {
296296

297297
// start to start all worker
298298
func (q *Queue) start() {
299-
tasks := make(chan core.QueuedMessage, 1)
299+
tasks := make(chan core.TaskMessage, 1)
300300

301301
for {
302302
// check worker number

0 commit comments

Comments
 (0)