-
-
Notifications
You must be signed in to change notification settings - Fork 120
a config initialized for queue timeout #230
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
a config initialized for queue timeout #230
Conversation
Why don't you like it? I don't like the cause of the issue. I'm in general would like send many independent jobs to queue so we don't have long living jobs. But for some reason I was not satisfied with the solution #78 |
First, I feel like this configuration should be inside the queue itself. But we are putting a separate configuration for this queue. Second, there is no But also, for some reason, RDMS can be very slow, and the time out can be exceeded. Paralel import can not be a solution somehow when the data provider is really slow. I could not check the details of #78, but maybe I can check over the weekend. |
Codecov ReportBase: 95.80% // Head: 96.04% // Increases project coverage by
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## master #230 +/- ##
============================================
+ Coverage 95.80% 96.04% +0.24%
- Complexity 184 188 +4
============================================
Files 34 36 +2
Lines 524 632 +108
============================================
+ Hits 502 607 +105
- Misses 22 25 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
True but as we don't have other user cases to modify queue properties I think this solution acceptable. Simple and works. Next time we can think about more robust solution. There is a risk for backward compatibility if we will introduce better solution later. But I think that's ok. |
So, we just need to improve the tests and merge this PR. Let me check the tests again for this PR. I will ping you again. |
While testing this, I tried to understand how this part worked again. And, I am confused a little bit. We are chaining the jobs in here, right? In here, on line 50, we are creating a job as |
For the testing side, I could not find how we can test this part inside the Feature tests. I created a |
True I think we have to set it to both jobs |
For testing instead of sleep I believe it's better to use bus fake and check jobs have proper timeouts https://laravel.com/docs/9.x/mocking#bus-fake |
Let me check this. Thanks. ✌️ |
d083ce9
to
93e4efa
Compare
Could you check the Buss::fake() part? I just fake the queues one by one and check whether the timeout field is set correctly or not. @matchish |
If you change assert to |
It is failing when I do it.
Do I need to do a negative tests, too? |
No) It's just red green approach for writing tests.first you write a test that fails then fix it to pass. Of course it's better to change code to have red test but here I don't see difference we can change test to have failed test as well. To summarize no I don't see a reason to have negative tests) |
I think I could not understand the main topic of what is preventing merging this PR to the repository. |
I believe it's ready to merge. just wanted to have feedback from @amcsi |
Let's wait one week more if you don't need it asap |
Thanks, I have left a review. No need to hurry with this for me. |
Failed tests are related to this : php-http/discovery#217 |
We need to wait for php-http/discovery issue. I found this PR and saying that we fixed the bug. But I guess, it is not working for us. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved from my side 👍 apart from the CI failures
I created an issue with elasticsearch client and waiting for the merge. After this merge, we can rerun the tests to see green. Then, I guess we can merge this PR. Thanks for excellent review @amcsi |
So, Elasticsearch merged the PR to the main branch. I am waiting for the composer updates and than we can rerun the tests again. |
So, we are good. Tests passed in the end. @matchish |
#229 I don't like this solution. But I created a PR to see what we can do and discuss on it.