Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline SQS only seems to run jobs when first ran #210

Open
Cyapow opened this issue Apr 19, 2022 · 1 comment
Open

Offline SQS only seems to run jobs when first ran #210

Cyapow opened this issue Apr 19, 2022 · 1 comment

Comments

@Cyapow
Copy link

Cyapow commented Apr 19, 2022

Hi guys

I'm working on SQS locally using the serverless-offline-sqs. All works swimmingly on the initial run and any jobs in the queue will run straight away or if no jobs are in the queue the first one I fire off will get processed

But if I add more jobs to the queue they don't get processed unless I restart the whole serverless command.

If anyone has experienced this before please let me know as that would be great.

@psiservices-uwidmark
Copy link

I was getting this too. My problem was that my handler was not async/returning a promise as I intended it to. The other option being calling the callback function. In other words your sqs lambda should be one of:

exports.handler =  function(event, context, callback) { ... callback(); ...}
exports.handler = async function(event) { .... }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants