You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: refactor message handling and encoding in queue system (#138)
- Remove `Encode` method call in `BenchmarkQueue` function
- Add `TaskMessage` interface extending `QueuedMessage` with `Payload` method
- Rename `Payload` field to `Body` in `Message` struct
- Add `Payload` method to `Message` struct to return `Body`
- Replace `Data` field and `Encode` method in `Message` struct with `Bytes` method using JSON marshalling
- Update `NewMessage` to use `Body` instead of `Payload`
- Add documentation for `Encode` method in `job` package
- Update `TestMessageEncodeDecode` to use `Payload()` method
- Replace `Encode` method call with direct handling of `task` in `Queue` methods
- Change logger from `Errorf` to `Fatalf` in `Queue` error handling
- Add type assertion and handling for `job.Message` in `Queue`'s `run` method
- Import `job` package in `ring.go`
- Add `Data` struct with `Payload` field and `Bytes` method in `ring.go`
- Update `Ring`'s `Run` method to use `Data` struct for task handling
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
0 commit comments