ваше сообщение коммита
This commit is contained in:
@@ -21,9 +21,9 @@ const requiredDependencies = ['express-rate-limit', 'winston', 'helmet', 'csurf'
|
||||
const missingDependencies = requiredDependencies.filter((dep) => !dependencies[dep]);
|
||||
|
||||
if (missingDependencies.length > 0) {
|
||||
console.error('Missing dependencies:', missingDependencies);
|
||||
console.error('Please install them with: yarn add ' + missingDependencies.join(' '));
|
||||
// console.error('Missing dependencies:', missingDependencies);
|
||||
// console.error('Please install them with: yarn add ' + missingDependencies.join(' '));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log('All required dependencies are installed.');
|
||||
// console.log('All required dependencies are installed.');
|
||||
|
||||
@@ -15,19 +15,19 @@ const db = require('../db');
|
||||
|
||||
async function cleanupSessions() {
|
||||
try {
|
||||
console.log('Starting session cleanup...');
|
||||
// console.log('Starting session cleanup...');
|
||||
|
||||
const result = await sessionService.cleanupProcessedGuestIds();
|
||||
|
||||
if (result) {
|
||||
console.log('Session cleanup completed successfully');
|
||||
// console.log('Session cleanup completed successfully');
|
||||
} else {
|
||||
console.log('Session cleanup failed');
|
||||
// console.log('Session cleanup failed');
|
||||
}
|
||||
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('Error during cleanup:', error);
|
||||
// console.error('Error during cleanup:', error);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,14 +17,14 @@ process.env.OLLAMA_MODEL = 'qwen2.5:7b';
|
||||
const aiQueueService = require('../services/ai-queue');
|
||||
|
||||
async function testQueueInDocker() {
|
||||
console.log('🐳 Тестирование AI очереди в Docker...\n');
|
||||
// console.log('🐳 Тестирование AI очереди в Docker...\n');
|
||||
|
||||
try {
|
||||
// Проверяем инициализацию
|
||||
console.log('1. Проверка инициализации очереди...');
|
||||
// console.log('1. Проверка инициализации очереди...');
|
||||
const stats = aiQueueService.getStats();
|
||||
console.log('✅ Очередь инициализирована:', stats.isInitialized);
|
||||
console.log('📊 Статистика:', {
|
||||
// console.log('✅ Очередь инициализирована:', stats.isInitialized);
|
||||
// console.log('📊 Статистика:', {
|
||||
totalProcessed: stats.totalProcessed,
|
||||
totalFailed: stats.totalFailed,
|
||||
currentQueueSize: stats.currentQueueSize,
|
||||
|
||||
@@ -11,7 +11,7 @@ const OLLAMA_URL = process.env.OLLAMA_URL || 'http://ollama:11434';
|
||||
const MODEL_NAME = process.env.OLLAMA_MODEL || 'qwen2.5:7b';
|
||||
|
||||
async function warmupModel() {
|
||||
console.log('🔥 Разогрев модели Ollama...');
|
||||
// console.log('🔥 Разогрев модели Ollama...');
|
||||
|
||||
try {
|
||||
// Проверяем доступность Ollama
|
||||
@@ -20,7 +20,7 @@ async function warmupModel() {
|
||||
throw new Error(`Ollama недоступен: ${healthResponse.status}`);
|
||||
}
|
||||
|
||||
console.log('✅ Ollama доступен');
|
||||
// console.log('✅ Ollama доступен');
|
||||
|
||||
// Отправляем простой запрос для разогрева
|
||||
const warmupResponse = await fetch(`${OLLAMA_URL}/v1/chat/completions`, {
|
||||
@@ -54,11 +54,11 @@ async function warmupModel() {
|
||||
}
|
||||
|
||||
const data = await warmupResponse.json();
|
||||
console.log('✅ Модель разогрета успешно');
|
||||
console.log(`📝 Ответ модели: ${data.choices?.[0]?.message?.content?.substring(0, 100)}...`);
|
||||
// console.log('✅ Модель разогрета успешно');
|
||||
// console.log(`📝 Ответ модели: ${data.choices?.[0]?.message?.content?.substring(0, 100)}...`);
|
||||
|
||||
} catch (error) {
|
||||
console.error('❌ Ошибка разогрева модели:', error.message);
|
||||
// console.error('❌ Ошибка разогрева модели:', error.message);
|
||||
// Не прерываем запуск приложения
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user