Skip to content

Instantly share code, notes, and snippets.

@colinmollenhour
Created April 12, 2012 20:26
Show Gist options
  • Save colinmollenhour/2370745 to your computer and use it in GitHub Desktop.
Save colinmollenhour/2370745 to your computer and use it in GitHub Desktop.
Mongo Queue runner
<?php
require 'app/Mage.php';
if (!Mage::isInstalled()) {
echo "Application is not installed yet, please complete install wizard first.";
exit;
}
// Only for urls
// Don't remove this
$_SERVER['SCRIPT_NAME'] = str_replace(basename(__FILE__), 'index.php', $_SERVER['SCRIPT_NAME']);
$_SERVER['SCRIPT_FILENAME'] = str_replace(basename(__FILE__), 'index.php', $_SERVER['SCRIPT_FILENAME']);
Mage::app('admin')->setUseSessionInUrl(false);
try {
Mage::helper('mongo/queue')->runQueue(1000);
# Cm_Mongo_Profiler::debug();
} catch (Exception $e) {
Mage::printException($e);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment