Osclass Support Forums

Osclass plugin support => Ad Importer Plugin => Topic started by: Nagy Csaba on December 07, 2020, 02:36:48 PM

Title: delay in import
Post by: Nagy Csaba on December 07, 2020, 02:36:48 PM
Hi.

q: is thea a way to set delay in import ?

if i import single item ok if i import 4000 item not all images are imported
Title: Re: delay in import
Post by: MB Themes on December 08, 2020, 03:36:27 PM
@Nagy
Question is why those images are not loaded?
Title: Re: delay in import
Post by: Nagy Csaba on December 08, 2020, 06:05:52 PM
@Nagy
Question is why those images are not loaded?

one dollar shared hosting probabli

I imported whit your plugin 42629 ads for a customer from a to a dedicated server all ok
i got 2 more csv files fom a slow server i hawe to ad them 10 by 10 a a time if i dear to import 100 doe to delay i have no images
Title: Re: delay in import
Post by: MB Themes on December 08, 2020, 06:12:51 PM
You could add sleep function into loop function, maybe that will help you.
Title: Re: delay in import
Post by: Nagy Csaba on April 26, 2021, 09:42:05 PM
You could add sleep function into loop function, maybe that will help you.

 can u please help whit some instruction?
sleep(2); on what line in import function php.
Thank you
Title: Re: delay in import
Post by: MB Themes on April 27, 2021, 09:59:15 AM
@nagy
function.php of plugin, after line #14:
Code: [Select]
foreach($prepared_items as $row_id => $data) {
You could add:
Code: [Select]
sleep(1);
To simply process 1 listing per second.

You could also use usleep, that use as parameter microseconds instead of seconds, so you could write same as with sleep:
Code: [Select]
usleep(1000000);