asynq icon indicating copy to clipboard operation
asynq copied to clipboard

[BUG] Need to enqueue task from ROR or redis-cli.

Open Josh-ShubhamVyas opened this issue 1 year ago • 2 comments

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.

Josh-ShubhamVyas avatar May 30 '23 07:05 Josh-ShubhamVyas

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

jerroldgao avatar Jul 12 '23 14:07 jerroldgao

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.

reidcooper avatar Jan 16 '24 20:01 reidcooper