# Добавление PostgreSQL драйверов
RUN apk add --no-cache postgresql-dev \
- && docker-php-ext-install pdo_pgsql
+ && docker-php-ext-install pdo_pgsql calendar
# Копирование конфигурации
COPY ./conf/supervisord.conf /etc/supervisor/supervisord.conf
COPY ./conf/queue-worker.conf /etc/supervisor/conf.d/queue-worker.conf
[program:yii-queue]
-command=/usr/local/bin/php /www/yii queue/listen --verbose
+command=/usr/local/bin/php -d memory_limit=512M /www/yii queue/listen amqp --verbose=1 --color=0
autostart=true
autorestart=true
stderr_logfile=/var/log/supervisor/yii-queue.err.log
"kartik-v/yii2-export": "@dev",
"ramsey/uuid": "^4.7",
"ext-imap": "*",
+ "ext-calendar": "*",
"voku/simple_html_dom": "^4.8"
},
"require-dev": {
$service = new AutoPlannogrammaService();
$isEditable = date($model->year . '-' . $model->month . '-d') > date('Y-m-d') && (
- (date('d') < 28) || (date('Y-m-d', strtotime('-1 month', strtotime(date($model->year . '-' . $model->month . '-d')))) > date('Y-m-d')));
+ (date('d') < 27) || (date('Y-m-d', strtotime('-1 month', strtotime(date($model->year . '-' . $model->month . '-d')))) > date('Y-m-d')));
$categoryPlan = CategoryPlan::find()->where(['year' => $model->year, 'month' => $model->month, 'store_id' => $model->store_id])->indexBy('category')->asArray()->all();
$types = [];
$service = new AutoPlannogrammaService();
$isEditable = date($model->year . '-' . $model->month . '-d') > date('Y-m-d') && (
- (date('d') < 28) || (date('Y-m-d', strtotime('-1 month', strtotime(date($model->year . '-' . $model->month . '-d')))) > date('Y-m-d')));
+ (date('d') < 31) || (date('Y-m-d', strtotime('-1 month', strtotime(date($model->year . '-' . $model->month . '-d')))) > date('Y-m-d')));
$categoryPlan = CategoryPlan::find()->where(['year' => $model->year, 'month' => $model->month, 'store_id' => $model->store_id])->indexBy('category')->asArray()->all();
$types = [];
});
return $this->redirect(array_merge(
- ['index'],
+ ['new'],
$params
));
});
return $this->redirect(array_merge(
- ['index'],
+ ['new'],
$params
));
}
'ttr' => 300, // Время для выполнения задания
'attempts' => 3, // Количество попыток
'exchangeName' => 'telegram-exchange',
-
-
-
],
'urlManager' => [
'enablePrettyUrl' => true,
],
],
],
- 'queue' => [
- 'class' => Queue::class,
- //'dsn' => 'amqp://admin:3qqHK2MRgGgxUdVT61@rabbitmq-yii_erp24:5672',
- 'dsn' => 'amqp://admin:3qqHK2MRgGgxUdVT61@localhost:5672',
- 'queueName' => 'telegram-queue',
- 'as log' => \yii\queue\LogBehavior::class,
- 'ttr' => 300, // Время для выполнения задания
- 'attempts' => 3, // Количество попыток
- 'exchangeName' => 'telegram-exchange',
- ],
+
'user' => [
'identityClass' => \yii_app\records\Admin::class,
'enableAutoLogin' => false,