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

uniqueId will cause the job not finished... #7

Open
vFire opened this issue Feb 22, 2021 · 3 comments
Open

uniqueId will cause the job not finished... #7

vFire opened this issue Feb 22, 2021 · 3 comments

Comments

@vFire
Copy link

vFire commented Feb 22, 2021

When I set the uniqueId in the queue job file, it won't finished anymore... The queue will be blocked ...

@spekulatius
Copy link
Owner

Hello @vFire

could you provide an example of your code for this? Which versions are you running?

Cheers,
Peter

@vFire
Copy link
Author

vFire commented Feb 24, 2021

Hi Spekulatius,

Thanks for your quickly response, it's because of the local .env file and app config, run in browser and local command sometimes will mix up the key in redis ...
I've fixed it, I realized that when the queue is running, even I define it in a laravel job, the queue is still running independently, so if I want to stop the queue, I have to kill the worker directly, I just simply define 100 urls each queue to process, and schedule the job every one minute to run. That works for me in real business, although I think still need some adjustment in further to improve the efficient when more and more sites need to be crawed parallelly.

If you know any better solution, pls let me know, much appreciated!

@spekulatius
Copy link
Owner

Hey @vFire

sounds like you found a solution. Maybe you could ensure the job isn't run double? https://laravel.com/docs/8.x/queues#preventing-job-overlaps this might help.

Cheers,
Peter

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