[GH-ISSUE #664] [BUG] Need to enqueue task from ROR or redis-cli. #2357

Open
opened 2026-03-15 20:13:43 +03:00 by kerem · 2 comments
Owner

Originally created by @Josh-ShubhamVyas on GitHub (May 30, 2023).
Original GitHub issue: https://github.com/hibiken/asynq/issues/664

Originally assigned to: @hibiken on GitHub.

So we are migrating a module from Rails to Golang. We have implemented sidekiq in rails for the same module so we are planning to use asynq in Golang to achieve the background processing like sidekiq.

When I looked for some examples online I did find an example for version v0.17.1 and using the following Redis command to create a task but it fails with an error
Redis command
RPUSH asynq:{critical} '{"Type":"dls:validate","Payload":{"release_upload_id":18921,"format":"Brandscope"},"ID":"1803b40c-6118-4b78-b3a0-4564e0411db1","Queue":"critical","Retry":25,"Retried":0,"ErrorMsg":"","Timeout":1800,"Deadline":0,"UniqueKey":""}'
Error
Could not remove task id=1803b40c-6118-4b78-b3a0-4564e0411db1 type="dls:validate" from "asynq:{critical}:active" err: NOT FOUND

Can anyone please help me here? I do want to use the latest version but asynq is using hash type for new tasks and we do encode some text which will be harder to repeat in rails. Any alternative solutions you can give me are welcome.
I want to queue tasks using rails instead of golang.

Originally created by @Josh-ShubhamVyas on GitHub (May 30, 2023). Original GitHub issue: https://github.com/hibiken/asynq/issues/664 Originally assigned to: @hibiken on GitHub. So we are migrating a module from Rails to Golang. We have implemented sidekiq in rails for the same module so we are planning to use asynq in Golang to achieve the background processing like sidekiq. When I looked for some examples online I did find an example for version v0.17.1 and using the following Redis command to create a task but it fails with an error Redis command `RPUSH asynq:{critical} '{"Type":"dls:validate","Payload":{"release_upload_id":18921,"format":"Brandscope"},"ID":"1803b40c-6118-4b78-b3a0-4564e0411db1","Queue":"critical","Retry":25,"Retried":0,"ErrorMsg":"","Timeout":1800,"Deadline":0,"UniqueKey":""}'` Error `Could not remove task id=1803b40c-6118-4b78-b3a0-4564e0411db1 type="dls:validate" from "asynq:{critical}:active" err: NOT FOUND` Can anyone please help me here? I do want to use the latest version but asynq is using hash type for new tasks and we do encode some text which will be harder to repeat in rails. Any alternative solutions you can give me are welcome. I want to queue tasks using rails instead of golang.
Author
Owner

@jerroldgao commented on GitHub (Jul 12, 2023):

Got the same issue
Could not remove task id=fa9f5826-679b-4b54-9080-1ad6d8919e19 type="filter_social_feed" from "asynq:{default}:active" err: INTERNAL_ERROR: redis eval error: write tcp ***: i/o timeout; Will retry syncing

<!-- gh-comment-id:1632626420 --> @jerroldgao commented on GitHub (Jul 12, 2023): Got the same issue `Could not remove task id=fa9f5826-679b-4b54-9080-1ad6d8919e19 type="filter_social_feed" from "asynq:{default}:active" err: INTERNAL_ERROR: redis eval error: write tcp ***: i/o timeout; Will retry syncing`
Author
Owner

@reidcooper commented on GitHub (Jan 16, 2024):

I would suggest not pushing directly through Redis since your error sounds like there are other pieces of information that Asynq keeps track off that you are not doing in addition to pushing the job info.

Maybe build a script that reads your sidekiq jobs and pushes them into asynq using the official API.

<!-- gh-comment-id:1894470366 --> @reidcooper commented on GitHub (Jan 16, 2024): I would suggest not pushing directly through Redis since your error sounds like there are other pieces of information that Asynq keeps track off that you are not doing in addition to pushing the job info. Maybe build a script that reads your sidekiq jobs and pushes them into asynq using the official API.
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#2357
No description provided.