[PR #303] [MERGED] client.Enqueue - prevent empty task typename #706

Closed
opened 2026-03-02 06:05:16 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hibiken/asynq/pull/303
Author: @lmikolajczak
Created: 8/1/2021
Status: Merged
Merged: 8/3/2021
Merged by: @hibiken

Base: masterHead: fr-297-empty-task-typename-fix


📝 Commits (3)

  • 2d891fb client.Enqueue - prevent empty task's typename
  • 08bda9c Adjust error message, use TrimSpace for more robust empty typename check
  • 2eb060d Add changelog entry, add additional test case

📊 Changes

4 files changed (+19 additions, -1 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 client.go (+4 -0)
📝 client_test.go (+10 -0)
📝 servemux.go (+1 -1)

📄 Description

Hi @hibiken! Thanks for this library and sharing your work 👍

When I was trying to get familiar with the code base and test out some of the features locally I also decided to contribute and help a little bit. I picked #297 as something that appears easy to start with. Please let me know if I missed something out or the solution should be improved/adjusted. Keep in mind that currently you're still able to queue and consume tasks with typenames like " " (just a single whitespace). This can be a feature but maybe also should be handled differently?

Thanks again and I'm looking forward to contribute in future!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hibiken/asynq/pull/303 **Author:** [@lmikolajczak](https://github.com/lmikolajczak) **Created:** 8/1/2021 **Status:** ✅ Merged **Merged:** 8/3/2021 **Merged by:** [@hibiken](https://github.com/hibiken) **Base:** `master` ← **Head:** `fr-297-empty-task-typename-fix` --- ### 📝 Commits (3) - [`2d891fb`](https://github.com/hibiken/asynq/commit/2d891fb97f2cc8f6c47c39213dbddb2e9b9d9989) client.Enqueue - prevent empty task's typename - [`08bda9c`](https://github.com/hibiken/asynq/commit/08bda9c70b83be61e71c71df181d7af048036623) Adjust error message, use TrimSpace for more robust empty typename check - [`2eb060d`](https://github.com/hibiken/asynq/commit/2eb060dea6fba3169f47cf598c675e55984342ad) Add changelog entry, add additional test case ### 📊 Changes **4 files changed** (+19 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `client.go` (+4 -0) 📝 `client_test.go` (+10 -0) 📝 `servemux.go` (+1 -1) </details> ### 📄 Description Hi @hibiken! Thanks for this library and sharing your work 👍 When I was trying to get familiar with the code base and test out some of the features locally I also decided to contribute and help a little bit. I picked #297 as something that appears easy to start with. Please let me know if I missed something out or the solution should be improved/adjusted. Keep in mind that currently you're still able to queue and consume tasks with typenames like `" "` (just a single whitespace). This can be a feature but maybe also should be handled differently? Thanks again and I'm looking forward to contribute in future! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 06:05:16 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#706
No description provided.