-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[Messenger] Fix misleading comment about time-limit #38303
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
Conversation
79037ff to
0ce6565
Compare
nicolas-grekas
left a comment
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.
I'm not super convinced this is better for now. Any alternative proposal? (I don't :) )
18e0ff8 to
9478df4
Compare
| new InputOption('failure-limit', 'f', InputOption::VALUE_REQUIRED, 'The number of failed messages the worker can consume'), | ||
| new InputOption('memory-limit', 'm', InputOption::VALUE_REQUIRED, 'The memory limit the worker can consume'), | ||
| new InputOption('time-limit', 't', InputOption::VALUE_REQUIRED, 'The time limit in seconds the worker can run'), | ||
| new InputOption('time-limit', 't', InputOption::VALUE_REQUIRED, 'The time limit in seconds the worker can handle new messages'), |
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.
not sure I see why this is better sorry
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.
@nicolas-grekas "The time limit in seconds the worker can run" = "the worker cannot work more than this time limit"
So this sentence is wrong because the worker can actually run longer than the time limit.
Mine is right but surely not the best one, feel free to propose something if you have better ideas.
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.
I don't get why this tells something different. To me this is similar. Maybe it's my English...
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.
What about The time limit in seconds the worker can consume new messages?
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.
@nicolas-grekas the difference is
- current sentence => when time's up, drop right now what you're doing and exit
- proposed one => when time's up, take all the time you need to finish what you're doing, then exit and don't get/retrieve/consume/handle any other message
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.
@Guikingone thank you, I'll update
9478df4 to
2117664
Compare
|
@nicolas-grekas I'll explain why I'm working on this PR so you get the context. I've found out this issue can happen:
I'm no expert with documentation but I've been misled by the current state of the documentation so I'm willing to put some effort to fix it and I appreciate your help to do so. |
nicolas-grekas
left a comment
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.
ok, works for me
|
Thank you @sylfabre. |
The current explanation of the time-limit option of the
messenger:consumecommand is misleading as it lets you think that this is an enforced hard limit.For instance, you may think that a command started with
--time-limit=10will stop once 10 seconds are elapsed, no matter what.Actually, two things happen:
I'm not sure this is behavior is actually a bug or not, but the current documentation does not describe the current behavior