'remote_profile_submissions' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'allow_alert_autodismissal' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'prevNextBackend' => CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME,
+ 'import_batch_size' => CRM_Core_BAO_Setting::SEARCH_PREFERENCES_NAME,
];
/**
'recentItemsProviders',
'dedupe_default_limit',
'prevNextBackend',
+ 'import_batch_size',
]);
}
$queue = Civi::queue('user_job_' . $this->getUserJobID(), ['type' => 'Sql', 'error' => 'abort', 'runner' => 'task', 'user_job_id' => $this->getUserJobID(), 'retry_limit' => 5]);
UserJob::update(FALSE)->setValues(['queue_id.name' => 'user_job_' . $this->getUserJobID()])->addWhere('id', '=', $this->getUserJobID())->execute();
$offset = 0;
- $batchSize = 50;
+ $batchSize = Civi::settings()->get('import_batch_size');
while ($totalRows > 0) {
if ($totalRows < $batchSize) {
$batchSize = $totalRows;
'callback' => 'CRM_Utils_Recent::getProviders',
],
],
+ 'import_batch_size' => [
+ 'name' => 'import_batch_size',
+ 'type' => 'Integer',
+ 'default' => 50,
+ 'quick_form_type' => 'Element',
+ 'html_type' => 'text',
+ 'html_attributes' => [
+ 'size' => 2,
+ 'maxlength' => 3,
+ ],
+ 'add' => '5.62',
+ 'title' => ts('Import Batch Size'),
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => ts('Number of records to process at once during import.'),
+ 'help_text' => ts('If your imports time out, reduce this number. You can increase it for better import performance on servers with longer timeouts.'),
+ 'settings_pages' => 'misc',
+ ],
'dedupe_default_limit' => [
'group_name' => 'CiviCRM Preferences',
'group' => 'core',