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

Store job attempt in job payload and refactor worker #28

Closed
wants to merge 11 commits into from

Conversation

georgeboot
Copy link
Contributor

@georgeboot georgeboot commented Dec 2, 2020

Fixes #14
Fixes #22

Change 1: Store job attempt in job payload

ApproximateReceiveCount should not be used when processing SQS jobs in Lambda. See https://link.medium.com/uUkT2W9bTbb for more info. This PR adds functionality to store the current attempt on the job payload, so we don't have to depend on ApproximateReceiveCount.

One downside of this, is that because we can't update sqs messages, we always have to re-create a message when releasing it back onto the queue.

Change 2: Refactor workers

This now uses the built-in worker to process jobs. This is more in line with how Laravel processes jobs for other drivers.


The code is 'backwards compatible' in the sense that the example worker.php remains identical. If you did not change that, all should continue working as usual.

The code is heavily inspired (and sometimes copied) from https://github.com/laravel/vapor-core/

@georgeboot georgeboot marked this pull request as ready for review December 2, 2020 13:38
@georgeboot
Copy link
Contributor Author

@mnapoli mind shining some light on this?

@mnapoli
Copy link
Member

mnapoli commented Jan 12, 2021

Thanks, that sounds like an interesting direction and I generally agree this is something worth exploring.

However this PR cannot be merged: it refactors too much stuff without explanations, and more importantly it contains copyrighted code copied without attribution which violates the license of the original code.

I'm going to close this PR, but I am not against going this route.

@mnapoli mnapoli closed this Jan 12, 2021
@georgeboot
Copy link
Contributor Author

See #31

mnapoli pushed a commit that referenced this pull request Mar 9, 2023
* Support binary response

* Dont prepare

* restore

* Update OctaneHandler.php

Co-authored-by: Till Krüss <[email protected]>
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

Successfully merging this pull request may close these issues.

Cannot get current attempt Using failed_jobs table instaed of dead-letter queue
2 participants