mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 06:00:13 +01:00
added batch processing limit to imap import
This commit is contained in:
parent
3ea8ed50a5
commit
dba24e4e00
@ -125,6 +125,13 @@ int process_imap_folder(int sd, int *seq, char *folder, struct session_data *sda
|
||||
data->import->total_messages += messages;
|
||||
|
||||
for(i=data->import->start_position; i<=messages; i++){
|
||||
|
||||
/* whether to quit after processing a batch of messages */
|
||||
|
||||
if(data->import->batch_processing_limit > 0 && data->import->processed_messages >= data->import->batch_processing_limit){
|
||||
break;
|
||||
}
|
||||
|
||||
data->import->processed_messages++;
|
||||
if(data->quiet == 0){ printf("processed: %7d [%3d%%]\r", data->import->processed_messages, 100*i/messages); fflush(stdout); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user