Skip to content

Commit 4696527

Browse files
committed
Fixes from syddjurs live
1 parent 3b4a03f commit 4696527

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

os2web_adlib_api.module

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ function os2web_adlib_api_status() {
211211
->condition(db_or()->condition('job_id', 'Complete', '!=')->isNull('job_id'))
212212
->execute()
213213
->fetchAll();
214-
$chunk_size = max(min((int) sqrt(count($items)), 25), 1);
214+
$chunk_size = max(min((int) sqrt(count($items)), 5), 1);
215215
$items = array_chunk($items, $chunk_size);
216216
foreach ($items as $item) {
217217
$batch['operations'][] = array('_os2web_adlib_api_process_fid', array($item));
@@ -298,15 +298,15 @@ function os2web_adlib_api_cron() {
298298
_os2web_adlib_api_do_processing();
299299

300300
// Add set up queue for adlib requeueing.
301-
$queue = DrupalQueue::get('os2web_adlib_reprocess');
302-
if ($queue->numberOfItems() == 0) {
303-
$items = _os2web_adlib_api_bulletpoint_nid();
304-
$chunk_size = max(min((int) sqrt(count($items)), 25), 1);
305-
$items = array_chunk($items, $chunk_size);
306-
foreach ($items as $item) {
307-
$queue->createItem($item);
308-
}
309-
}
301+
// $queue = DrupalQueue::get('os2web_adlib_reprocess');
302+
// if ($queue->numberOfItems() == 0) {
303+
// $items = _os2web_adlib_api_bulletpoint_nid();
304+
// $chunk_size = max(min((int) sqrt(count($items)), 25), 1);
305+
// $items = array_chunk($items, $chunk_size);
306+
// foreach ($items as $item) {
307+
// $queue->createItem($item);
308+
// }
309+
// }
310310
}
311311

312312
/**
@@ -450,7 +450,7 @@ function _os2web_adlib_api_do_processing() {
450450
->condition(db_or()->condition('job_id', 'Complete', '!=')->isNull('job_id'))
451451
->execute()
452452
->fetchAll();
453-
$chunk_size = max(min((int) sqrt(count($items)), 25), 1);
453+
$chunk_size = max(min((int) sqrt(count($items)), 5), 1);
454454
$items = array_chunk($items, $chunk_size);
455455
foreach ($items as $item) {
456456
if ($item->job_id != 'Complete') {

0 commit comments

Comments
 (0)