<commit_before><?php
/**
 * Yiiq - background job queue manager for Yii
 *
 * This file contains Yiiq main command class.
 * 
 * @author  <NAME> <<EMAIL>>
 * @package ext.yiiq.commands
 */

/**
 * Yiiq main command class.
 * 
 * @author  <NAME> <<EMAIL>>
 */
class YiiqCommand extends YiiqBaseCommand
{
    /**
     * Run worker for given queue.
     * 
     * @param  array[optional] $queue  Yiiq::DEFAULT_QUEUE by default
     * @param  int[optional] $threads   Yiiq::DEFAULT_THREADS by default
     */
    public function actionStart(array $queue = null, $threads = null)
    {
        Yii::app()->getComponent('yiiq');

        $queues = $queue ?: array(Yiiq::DEFAULT_QUEUE);
        $stringifiedQueues = implode(', ', $queues);
        $threads = (int)$threads ?: Yiiq::DEFAULT_THREADS;

        $command = 'nohup sh -c "'.escapeshellarg(Yii::app()->basePath.'/yiic').' yiiqWorker run ';
        foreach ($queues as $queue) {<commit_msg>Impoved queue parameter format<commit_after><?php
/**
 * Yiiq - background job queue manager for Yii
 *
 * This file contains Yiiq main command class.
 * 
 * @author  <NAME> <<EMAIL>>
 * @package ext.yiiq.commands
 */

/**
 * Yiiq main command class.
 * 
 * @author  <NAME> <<EMAIL>>
 */
class YiiqCommand extends YiiqBaseCommand
{
    /**
     * Run worker for given queue.
     * 
     * @param  array[optional] $queue  Yiiq::DEFAULT_QUEUE by default
     * @param  int[optional] $threads   Yiiq::DEFAULT_THREADS by default
     */
    public function actionStart(array $queue = null, $threads = null)
    {
        Yii::app()->getComponent('yiiq');

        // Create array of unique queue names.
        // Split each --queue value by comma and then combine all values
        // into single-dimension array.
        $queues = $queue ?: array(Yiiq::DEFAULT_QUEUE);
        foreach ($queues as $index => $queue) {
            $queues[$index] = preg_split('/\s*\,\s*/', $queue);
        }
        $queues = call_user_func_array('array_merge', array_merge($queues));
        $queues = array_unique($queues);
        $stringifiedQueues = implode(', ', $queues);

        $threads = (int)$threads ?: Yiiq::DEFAULT_THREADS;

        $command = 'nohup sh -c "'.escapeshellarg(Yii::app()->basePath.'/yiic').' yiiqWorker run ';
        foreach ($queues as $queue) {
{'fraction_non_alphanumeric': 0.14986967854039965, 'fraction_numerical': 0.0, 'mean_word_length': 2.8192371475953566, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4763642', 'n_tokens_mistral': 763, 'n_tokens_neox': 746, 'n_words': 188}