Commit 35025df2 authored by Tobias Munk's avatar Tobias Munk

updated changelog, added workaround for Redis Queue-IDs, disabled cron in test container by default

parent b805b550
Pipeline #76543 passed with stage
in 3 minutes and 15 seconds
# Changelog
### 5.8.0 (under development)
### 5.9.0 (under development)
- updated base image to `yiisoftware/yii2-php:8.1-fpm-nginx`
- added debug-by-env variables `APP_DEBUG_KEY`, `APP_DEBUG_TOKEN`
### 5.8.0
- switched base image to `yiisoftware/yii2-php:8.0-fpm-nginx`
- moved `c3.php` to test root folder
......
......@@ -43,6 +43,7 @@ use lajax\translatemanager\services\scanners\ScannerPhpFunction;
use lo\modules\noty\Module as NotyModule;
use pheme\settings\components\Settings;
use rmrevin\yii\fontawesome\FA;
use yii\base\Event;
use yii\caching\ArrayCache;
use yii\caching\DummyCache;
use yii\db\Connection as DbConnection;
......@@ -99,6 +100,24 @@ if (getenv('MYSQL_ATTR_SSL_CA')) {
$dbAttributes[PDO::MYSQL_ATTR_SSL_CA] = getenv('MYSQL_ATTR_SSL_CA');
}
// update Redis increment counter according to queue_manager db (workaround)
// TODO: use table_prefix
Event::on(Queue::class, Queue::EVENT_BEFORE_PUSH, function ($event) {
if (Yii::$app->cache->get('queue_id_synced') !== true) {
$lastQueueIdSql = <<<SQL
SELECT `AUTO_INCREMENT`
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'app_queue_manager'
SQL;
$lastModelId = Yii::$app->db->createCommand($lastQueueIdSql)->queryScalar();
Yii::$app->redis->set("queue.message_id", $lastModelId);
Yii::$app->cache->set('queue_id_synced', true);
Yii::info("Synced redis queue id with database ($lastModelId)");
}
return $event;
});
$boxLayout = '@backend/views/layouts/box';
// Basic configuration, used in web and console applications
......
......@@ -29,6 +29,7 @@ services:
- APP_ASSET_USE_BUNDLED=1
- APP_CONFIG_FILE=@root/tests/codeception/_config/test.php
- APP_ASSET_FORCE_PUBLISH=0
- SUPERVISOR_START_CRON=false
- XDEBUG_MODE=develop,coverage
volumes:
# Re-use local composer cache via host-volume
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment