当前位置: 首页>>代码示例>>PHP>>正文


PHP CRM_Core_BAO_ActionSchedule::processQueue方法代码示例

本文整理汇总了PHP中CRM_Core_BAO_ActionSchedule::processQueue方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_BAO_ActionSchedule::processQueue方法的具体用法?PHP CRM_Core_BAO_ActionSchedule::processQueue怎么用?PHP CRM_Core_BAO_ActionSchedule::processQueue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRM_Core_BAO_ActionSchedule的用法示例。


在下文中一共展示了CRM_Core_BAO_ActionSchedule::processQueue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 public function run($now = NULL)
 {
     require_once 'CRM/Core/BAO/ActionSchedule.php';
     CRM_Core_BAO_ActionSchedule::processQueue($now);
 }
开发者ID:hguru,项目名称:224Civi,代码行数:5,代码来源:action.cronjob.php

示例2: civicrm_api3_job_send_reminder

/**
 * Send the scheduled reminders for all contacts (either for activities or events)
 *
 * @param  array   	  $params (reference ) input parameters
 *                        now - the time to use, in YmdHis format
 *                            - makes testing a bit simpler since we can simulate past/future time
 *
 * @return boolean        true if success, else false
 * @static void
 * @access public
 *
 */
function civicrm_api3_job_send_reminder($params)
{
    require_once 'CRM/Core/BAO/ActionSchedule.php';
    $result = CRM_Core_BAO_ActionSchedule::processQueue(CRM_Utils_Array::value('now', $params));
    if ($result['is_error'] == 0) {
        return civicrm_api3_create_success();
    } else {
        return civicrm_api3_create_error($result['messages']);
    }
}
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:22,代码来源:Job.php

示例3: civicrm_api3_job_send_reminder

/**
 * Send the scheduled reminders for all contacts (either for activities or events).
 *
 * @param array $params
 *   (reference ) input parameters.
 *                        now - the time to use, in YmdHis format
 *                            - makes testing a bit simpler since we can simulate past/future time
 *
 * @return array
 */
function civicrm_api3_job_send_reminder($params)
{
    //note that $params['rowCount' can be overridden by one of the preferred syntaxes ($options['limit'] = x
    //It's not clear whether than syntax can be passed in via the UI config - but this keeps the pre 4.4.4 behaviour
    // in that case (ie. makes it non-configurable via the UI). Another approach would be to set a default of 0
    // in the _spec function - but since that is a deprecated value it seems more contentious than this approach
    $params['rowCount'] = 0;
    $lock = Civi::lockManager()->acquire('worker.core.ActionSchedule');
    if (!$lock->isAcquired()) {
        return civicrm_api3_create_error('Could not acquire lock, another ActionSchedule process is running');
    }
    $result = CRM_Core_BAO_ActionSchedule::processQueue(CRM_Utils_Array::value('now', $params), $params);
    $lock->release();
    if ($result['is_error'] == 0) {
        return civicrm_api3_create_success();
    } else {
        return civicrm_api3_create_error($result['messages']);
    }
}
开发者ID:hyebahi,项目名称:civicrm-core,代码行数:29,代码来源:Job.php

示例4: civicrm_api3_job_send_reminder

/**
 * Send the scheduled reminders for all contacts (either for activities or events)
 *
 * @param  array       $params (reference ) input parameters
 *                        now - the time to use, in YmdHis format
 *                            - makes testing a bit simpler since we can simulate past/future time
 *
 * @return boolean        true if success, else false
 * @static void
 * @access public
 *
 */
function civicrm_api3_job_send_reminder($params)
{
    $lock = new CRM_Core_Lock('civimail.job.EmailProcessor');
    if (!$lock->isAcquired()) {
        return civicrm_api3_create_error('Could not acquire lock, another EmailProcessor process is running');
    }
    $result = CRM_Core_BAO_ActionSchedule::processQueue(CRM_Utils_Array::value('now', $params), $params);
    $lock->release();
    if ($result['is_error'] == 0) {
        return civicrm_api3_create_success();
    } else {
        return civicrm_api3_create_error($result['messages']);
    }
}
开发者ID:archcidburnziso,项目名称:civicrm-core,代码行数:26,代码来源:Job.php


注:本文中的CRM_Core_BAO_ActionSchedule::processQueue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。