mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-15 06:22:52 +00:00
Add --req-time-cost
This commit is contained in:
parent
fa24655404
commit
b522a0f763
3 changed files with 31 additions and 4 deletions
|
@ -63,6 +63,13 @@ def get_args():
|
|||
metavar="<number>",
|
||||
help="Set the maximum number of request limit offences that a client can exceed before being banned. (%(default)s)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--req-time-cost",
|
||||
default=DEFARGS['REQ_TIME_COST'],
|
||||
type=int,
|
||||
metavar="<number>",
|
||||
help="Considers a time cost (in seconds) for request limiting purposes. If a request takes 10 seconds and this value is set to 5, the request cost is either 2 or the actual request cost (whichever is greater). (%(default)s)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--batch-limit",
|
||||
default=DEFARGS['BATCH_LIMIT'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue