@@ -110,9 +110,9 @@ class ConcurrencySettings:
110110 def __init__ (
111111 self ,
112112 min_concurrency : int = 1 ,
113- max_concurrency : int = 200 ,
113+ max_concurrency : int = 100 ,
114114 max_tasks_per_minute : float = float ('inf' ),
115- desired_concurrency : int | None = None ,
115+ desired_concurrency : int = 10 ,
116116 ) -> None :
117117 """Initialize a new instance.
118118
@@ -125,21 +125,21 @@ def __init__(
125125 desired_concurrency: The desired number of tasks that should be running parallel on the start of the pool,
126126 if there is a large enough supply of them. By default, it is `min_concurrency`.
127127 """
128- if desired_concurrency is not None and desired_concurrency < 1 :
129- raise ValueError ('desired_concurrency must be 1 or larger' )
130-
131128 if min_concurrency < 1 :
132129 raise ValueError ('min_concurrency must be 1 or larger' )
133130
134131 if max_concurrency < min_concurrency :
135132 raise ValueError ('max_concurrency cannot be less than min_concurrency' )
136133
134+ if desired_concurrency < min_concurrency :
135+ raise ValueError ('desired_concurrency cannot be less than min_concurrency' )
136+
137137 if max_tasks_per_minute <= 0 :
138138 raise ValueError ('max_tasks_per_minute must be positive' )
139139
140140 self .min_concurrency = min_concurrency
141141 self .max_concurrency = max_concurrency
142- self .desired_concurrency = desired_concurrency if desired_concurrency is not None else min_concurrency
142+ self .desired_concurrency = desired_concurrency
143143 self .max_tasks_per_minute = max_tasks_per_minute
144144
145145
0 commit comments