var featureFlagHelper Vaimo_FeatureFlag_He lper_Data featureFlagHelper

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/** @var $featureFlagHelper Vaimo_FeatureFlag_Helper_Data */
$featureFlagHelper = Mage::helper('featureflag');
if ($featureFlagHelper->canUseFeature('gearman')) {
/** @var $gearmanTaskHelper Vaimo_Gearman_Helper_Task */
$gearmanTaskHelper = Mage::helper('vaimo_gearman/task');
$data = array(
'task_name' => 'runSingleTask',
'helper' => 'konga_ordersplit',
'method' => 'splitOrder',
'params' => array($order->getId()),
);
$gearmanTaskHelper->addGearmanTask($data);
} else {
Mage::helper('BackgroundTask')
->addTask(array(
'description' => sprintf('Schedule order split for order [%s] with id [%s]',
$order->getIncrementId(),
$order->getId()),
'helper' => 'konga_ordersplit',
'method' => 'splitOrder',
'params' => array($order->getId())
));
}