@@ -185,15 +185,15 @@ def cancel(self):
185185 return self .write ({'state' : 'cancel' })
186186
187187 @api .model
188- def process_email_queue (self , ids = (), batch_size = 1000 ):
188+ def process_email_queue (self , email_ids = (), batch_size = 1000 ):
189189 """Send immediately queued messages, committing after each
190190 message is sent - this is not transactional and should
191191 not be called during another transaction!
192192
193193 A maximum of 1K MailMail (configurable using 'mail.mail.queue.batch.size'
194194 optional ICP) are fetched in order to keep time under control.
195195
196- :param list ids : optional list of emails ids to send. If given only
196+ :param list email_ids : optional list of emails ids to send. If given only
197197 scheduled and outgoing emails within this ids list
198198 are sent;
199199 """
@@ -207,8 +207,8 @@ def process_email_queue(self, ids=(), batch_size=1000):
207207 if 'filters' in self .env .context :
208208 domain .extend (self .env .context ['filters' ])
209209 batch_size = int (self .env ['ir.config_parameter' ].sudo ().get_param ('mail.mail.queue.batch.size' , batch_size )) or batch_size
210- send_ids = self .search (domain , limit = batch_size if not ids else batch_size * 10 ).ids
211- if not ids :
210+ send_ids = self .search (domain , limit = batch_size if not email_ids else batch_size * 10 ).ids
211+ if not email_ids :
212212 ids_done = set ()
213213 total = len (send_ids ) if len (send_ids ) < batch_size else self .search_count (domain )
214214
@@ -220,7 +220,7 @@ def post_send_callback(ids):
220220 # commit progress only when running from a cron job
221221 self .env ['ir.cron' ]._commit_progress (len (processed ), remaining = total - len (ids_done ))
222222 else :
223- send_ids = list (set (send_ids ) & set (ids ))
223+ send_ids = list (set (send_ids ) & set (email_ids ))
224224 post_send_callback = None
225225
226226 send_ids .sort ()
0 commit comments