Commit Graph
100 Commits
Author SHA1 Message Date
F4iljiandQwen-Coder cc20906062 fix(IMAP): исправить загрузку вложений — setFetchBody(true) необходим для структуры
Проблема: setFetchBody(false) не загружал структуру письма,
поэтому getAttachments() возвращал пустой список.

Исправления:
- FetchUnreadEmailsTask: setFetchBody(true) для загрузки структуры (вложения)
- FetchUnreadEmailsTask: конвертация Attribute в строку для subject
- config/imap.php: убраны fetch_body/fetch_flags (контроль на уровне Query)
- Обновлена документация

Fix: "В письме не найдено вложений" ошибка при обработке email

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-06 22:17:21 +05:00
F4iljiandQwen-Coder c115a5c7a7 fix(IMAP): оптимизация обработки email для предотвращения memory exhaustion
Корневая проблема: библиотека webklex/php-imap загружала все тела писем
по умолчанию, что приводило к исчерпанию 256MB памяти при 50+ письмах.

Решение (3 уровня):

Уровень 1 - Конфигурация:
- config/imap.php: добавлены fetch_body=false, fetch_flags=false, fetch_limit=20
- php.ini: увеличен memory_limit с 256M до 1G, добавлены OPcache настройки

Уровень 2 - Оптимизация кода:
- FetchUnreadEmailsTask: setFetchBody(false), лимиты, MemoryAwareTrait
- FetchEmailNewsAction: batch-обработка (10 писем), gc_collect_cycles()
- DownloadAttachmentsTask: lazy load вложений, extension whitelist (security)
- ConnectToImapTask: MemoryAwareTrait для мониторинга

Уровень 3 - Инфраструктура:
- ProcessEmailNewsJob: queue job для асинхронной обработки (3 попытки, 300s timeout)
- FetchEmailNewsCommand: поддержка --async режима
- MemoryAwareTrait: reusable трейт для мониторинга памяти

Security fixes:
- Extension whitelist для предотвращения path traversal
- Убраны реальные email из config/imap.php
- Добавлена проверка на null message объект

Docs:
- README_EMAIL_OPTIMIZATION.md: полная документация по оптимизации

Fixes: Allowed memory size of 268435456 bytes exhausted

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-06 22:08:03 +05:00
F4ilji 4b071d9ef2 Changes 2026-03-27 15:04:43 +05:00
F4ilji 5cf85f08e4 changes 2026-03-23 15:45:49 +05:00
F4ilji c350f712dc changes 2026-03-23 12:05:08 +05:00
F4ilji 1256adba98 changes 2026-03-23 10:50:31 +05:00
F4ilji b1c4f7b054 changes 2026-03-21 15:40:18 +05:00
F4ilji 56d9a0207c changes 2026-03-21 01:02:12 +05:00
F4ilji e58c3088f1 changes 2026-03-21 01:00:31 +05:00
F4ilji d0a106159d changes 2026-03-21 00:53:49 +05:00
F4ilji 836452add6 Changes 2026-03-20 23:35:09 +05:00
F4ilji c80a52ab86 changes 2026-03-20 22:26:10 +05:00
F4ilji a3948c872e Changes 2026-03-20 21:47:02 +05:00
F4ilji ae7b42acbe return LinksReform.js 2026-01-27 14:16:41 +05:00
F4ilji d0cda1dac2 return nginx.conf 2026-01-27 13:41:26 +05:00
F4ilji 7ff0ffc118 change GetEducationalProgramBySlugTask.php 2026-01-26 11:37:04 +05:00
F4ilji 7f93aa185e change LinksReform.js 2026-01-26 10:24:59 +05:00
F4ilji 2b4b97cd7e change EducationSection.vue 2026-01-26 10:13:05 +05:00
F4ilji eeab7cd343 change GetEducationsDataTask.php 2026-01-26 10:01:16 +05:00
F4ilji 9330ed457c change nginx.conf 2026-01-25 22:51:13 +05:00
F4ilji 1ae1b5b047 change helper.php 2026-01-22 14:27:12 +05:00
F4ilji 7ef80e7207 change nginx.conf 2026-01-22 14:03:55 +05:00
F4ilji c4be035890 change nginx.conf 2026-01-22 13:38:34 +05:00
F4ilji 8104d0b6cd change nginx.conf 2026-01-22 13:27:18 +05:00
F4ilji b976814d8b Updated nginx prod configuration 2026-01-21 16:36:48 +05:00
F4ilji afda333c25 Updated nginx prod configuration
Added schedule upload functionality in Filament
Updated .gitignore in public directory
2026-01-18 01:20:16 +05:00
F4ilji 1f61601e05 add cors rules 2026-01-09 19:07:51 +05:00
F4ilji 596e14feee remove jenkins in docker-compose.yml 2026-01-09 14:09:55 +05:00
F4ilji 2d101dcdda feat: Refactor MainController and related tasks to follow Porto architecture
- Moved logic from MainController to dedicated action and task classes.
- Introduced GetMainPageDataAction, GetEducationsDataTask, GetRecentPostsTask, GetUpcomingEventsTask, and GetPageDataTask for better separation of concerns.
- Updated routes to use the new MainController from the Main container.
- Deprecated the old MainController with a clear message for future removal.
- Updated caching mechanisms to use the new task classes.
- Adjusted environment variable access to use config() instead of env() for better practice.
- Added new MainPageResource for structured data response.
- Updated .gitignore to exclude QWEN.md.
- Added Jenkins service to docker-compose for CI/CD integration.
2025-12-16 12:20:01 +05:00
F4ilji 8bb7886ef7 Enhance TinyEditor configuration by refining 'test' profile settings and improving paste handling options 2025-12-02 14:23:00 +05:00
F4ilji a61d810d55 Improve image handling and logging in CreateVkPostJob for better error tracking and validation 2025-11-26 13:50:02 +05:00
F4ilji f6d6777d01 Enhance logging in CreateVkPostJob for better debugging and error tracking during post creation 2025-11-25 20:24:34 +05:00
F4ilji 537fa2b0b5 Refactor VkPostPublisher to simplify message formatting and enhance PostListItem layout for better author display 2025-11-25 16:10:50 +05:00
F4ilji a983ab0424 Remove disabled state from VK publication toggle in PostForm 2025-11-22 21:11:19 +05:00
F4ilji 864795749e Update pagination limit and improve author display in PostListItem 2025-11-20 15:58:48 +05:00
F4ilji b470138ccd Merge branch 'master' of https://github.com/F4ilji/ntspi-app 2025-11-20 15:13:18 +05:00
F4ilji 56935abfc0 Update default post status to published and enforce unique group names 2025-11-20 15:05:04 +05:00
F4ilji de4f8e27b8 Update ListBlock label to include exhibitions in InfoSection.vue 2025-11-20 15:04:49 +05:00
F4ilji 480e1a0553 chanage name list for InfoSection 2025-10-11 22:09:38 +05:00
F4ilji 2369eab332 change 2025-10-09 16:30:09 +05:00
F4ilji 6df819f30c disable vk auto post 2025-10-09 16:23:23 +05:00
F4ilji 6570b36cd0 remove regex validation 2025-10-08 18:10:14 +05:00
F4ilji 0a1bbcc297 remove tel validation for WorkersRelationManager.php 2025-10-08 17:52:29 +05:00
F4ilji 2297aab379 Added a check for the emptiness of the array for added programs in Departments/Show.vue 2025-10-08 01:11:52 +05:00
F4ilji 6a279d4942 small changes 2025-10-08 01:08:07 +05:00
F4ilji a65b70a23f delete tel validation 2025-10-05 18:35:44 +05:00
F4ilji d6a5db711d changes 2025-10-05 18:04:32 +05:00
F4ilji f4bfa04690 Refactor Time.vue layout by removing unnecessary margin from schedule and date/time blocks for improved styling consistency. 2025-09-29 16:44:25 +05:00
F4ilji ddefe4995e Remove progress bar from TvSliderBody component and increase slide duration from 9000ms to 15000ms for improved user experience. 2025-09-29 15:45:15 +05:00
F4ilji 4146880905 Add time method to TvController and update routes to include time endpoint for TV functionality. 2025-09-28 12:36:38 +05:00
F4ilji 72af09d93d Add Yandex Metrika integration for tracking; update FindSliderBySlugTask to ensure active slides are filtered correctly based on time; enhance app.blade.php for conditional Yandex Metrika script inclusion based on environment. 2025-09-27 22:35:36 +05:00
F4ilji 02fb2554c1 Enhance FindSliderBySlugTask to filter slides based on current time, ensuring only active slides within the valid time range are retrieved; update SlidesRelationManager to set default and minimum dates for start and end times. Improve Slider component styling for better visibility during loading state. 2025-09-27 14:11:25 +05:00
F4ilji 7c47b36c77 Enhance JournalsRelationManager actions to clear cache before creating, editing, and deleting journal issues, ensuring data consistency and improved performance. 2025-09-16 13:41:28 +05:00
F4ilji 3b55909906 Refactor BackButton component in Show.vue to use route name instead of URL; update PostAuthorsList.vue to correct conditional rendering for authors list display. 2025-09-11 12:37:49 +05:00
F4ilji b905ba4cb5 Refactor VK service URLs in CreateVkPostJob and UpdateVkPostJob to use 'vk.ru' instead of 'vk.com' for consistency; update BasicCarousel component to improve button visibility and touch event handling. 2025-09-09 12:14:58 +05:00
F4ilji ddf9f3a5dc Enhance WorkersRelationManager actions to clear cache before editing and detaching workers; update BasicCarousel button classes for improved visibility on larger screens. 2025-09-08 21:28:46 +05:00
F4ilji 335784231a Add Fruitcake CORS package and update CORS configuration to allow all methods, origins, and headers for improved API accessibility. 2025-09-06 00:17:51 +05:00
F4ilji 29daa1e3aa Update CORS configuration to allow all paths for enhanced API accessibility. 2025-09-05 23:59:40 +05:00
F4ilji 525c9edc65 Refactor VK service URLs to use 'vk.ru' instead of 'vk.com' for consistency; update CORS configuration to allow additional methods and origins, enhancing API security and flexibility. 2025-09-05 23:42:06 +05:00
F4ilji 2a5df7bc59 Merge branch 'master' of https://github.com/F4ilji/ntspi-app 2025-09-05 17:17:35 +05:00
F4ilji ff33023643 Add @gladesinger/vue3-yandex-smartcaptcha dependency, replace vue3-yandex-smartcaptcha with YandexSmartCaptcha in CaptchaBlock component, and update PersonalDataBlock label for compliance with data protection laws. 2025-09-05 17:13:04 +05:00
F4ilji c8ab16aecb Add @gladesinger/vue3-yandex-smartcaptcha dependency, refactor CaptchaBlock component to use YandexSmartCaptcha, and update PersonalDataBlock label for compliance with data protection laws. 2025-09-05 17:12:37 +05:00
F4ilji 5f121430a9 Refactor DesktopNavBar and MainPageNavbar for improved styling and accessibility; update TvSliderBody to enhance text size for better readability. 2025-09-05 09:27:59 +05:00
F4ilji 8b213ee803 Update PHP version requirement to ^8.2 in composer files, refactor User model access control logic, clean up MainSectionResource, enhance EditMainSection to include related pages, modify AppServiceProvider to clear subsection cache, change fallback locale to 'en', and improve DesktopNavBar and BasicFooter components for better accessibility and content accuracy. 2025-09-01 13:48:24 +05:00
F4ilji 3d300ac4d1 Remove migration file for notifications table 2025-09-01 13:47:59 +05:00
F4ilji 478be2e212 Update SlideFactory to set image URL to null, modify SlideResource to make image field optional, and adjust Slider components to display a default image when no URL is provided 2025-08-12 14:50:23 +05:00
F4ilji e34d49b3f4 add SlideFactory to Slide model and update DatabaseSeeder to include SlideSeeder for improved data seeding 2025-08-11 22:27:15 +05:00
F4ilji be68399ab8 changes Dockerfile 2025-08-11 17:55:07 +05:00
F4ilji 31c929d867 changes 2025-08-11 16:19:23 +05:00
F4ilji ec6e8766e2 Merge branch 'master' of https://github.com/F4ilji/ntspi-app 2025-08-11 16:18:28 +05:00
F4ilji e62b442991 Error correction and preparation of the project for initial deployment 2025-08-11 16:12:10 +05:00
F4ilji 8b2f9e99f0 add 'info' field as an array in DirectionStudy model; update DirectionStudyResource to include tabs for main information and admission details; modify Show.vue to display direction study information; enhance PageItemBlock.vue for better breadcrumb display 2025-07-27 21:33:00 +05:00
F4ilji cb95af3c46 update form handling in Page.vue and Show.vue components to use optional chaining for safer access to form IDs 2025-07-27 13:29:01 +05:00
F4ilji a4bdde6382 refactor educational components and API routes; update form handling in various actions and Vue components, enhance user interface for form display, and improve data retrieval logic in CreateAdmissionPlan job 2025-07-27 12:52:04 +05:00
F4ilji 9a1fcbbf9d update nginx configuration, enhance API route middleware to include 'web', add session middleware to HttpKernel, and improve educational program item and breadcrumbs components for better data display 2025-07-25 17:56:50 +05:00
F4ilji 16e7b9fe46 add time_added field to FilesBlock; update file upload logic to set timestamp and improve file display in FileBlock with additional metadata 2025-07-25 12:36:17 +05:00
F4ilji e403203e72 remove all .DS_Store files from the project 2025-07-22 18:49:44 +05:00
F4ilji 5ba5a101a3 refactor form builder components; simplify structure by removing unnecessary margin classes and enhancing code readability 2025-07-22 18:41:38 +05:00
F4ilji 528a4b24b0 refactor multiple widget controllers; replace caching logic with action classes for data retrieval, enhancing code clarity and maintainability 2025-07-22 18:22:04 +05:00
F4ilji 7a8a6e023d refactor ClientWidgetFormController; replace validation logic with SubmitWidgetFormAction for improved maintainability and clarity 2025-07-22 13:00:18 +05:00
F4ilji eac29d8d1c refactor ClientWidgetContactController and ClientWidgetPageReferenceListController; replace caching logic with action classes for widget data retrieval, enhancing code clarity and maintainability 2025-07-21 22:45:55 +05:00
F4ilji 3cac482409 refactor ClientDepartmentController and ClientFacultyController; replace caching logic with action classes for department and faculty retrieval, enhancing code clarity and maintainability 2025-07-20 18:02:14 +05:00
F4ilji 5179f45ef9 refactoring the InstituteStructure module 2025-07-20 00:37:22 +05:00
F4ilji 4558282da8 refactor ClientAcademicJournalController; replace caching logic with action classes for academic journal retrieval and improve code clarity 2025-07-19 12:49:10 +05:00
F4ilji 1fc793089c refactor PersonController; replace caching logic with GetPersonDataAction for improved maintainability and clarity 2025-07-18 17:10:49 +05:00
F4ilji de7ef99b47 refactor ClientScheduleController; replace complex query logic with ListSchedulesAction for improved maintainability and clarity 2025-07-18 16:35:30 +05:00
F4ilji 18d1501b67 refactor ClientProgramController; replace caching logic with action classes for educational program retrieval and enhance code clarity 2025-07-18 15:57:58 +05:00
F4ilji 839d8edfcd refactor ClientAdditionalEducationController; replace caching logic with action classes for data retrieval and improve code clarity 2025-07-18 14:31:19 +05:00
F4ilji b8235404b8 refactor search functionality; remove deprecated services and implement new action and task classes for improved structure and maintainability 2025-07-18 14:14:10 +05:00
F4ilji 0874d3e6b5 refactor sitemap generation and navigation handling; remove old GenerateSitemap command, update to use tasks for better organization, and enhance navigation data retrieval 2025-07-18 13:07:51 +05:00
F4ilji 1257cd552c refactor schedule module, added new filters 2025-06-27 10:16:10 +05:00
F4ilji 218e5ab8e3 changes 2025-06-25 22:48:01 +05:00
F4ilji efba91653e small fix 2025-06-19 08:23:41 +05:00
F4ilji 97bda3d353 small fix 2025-06-18 23:33:41 +05:00
F4ilji e92e8a912c adding new configuration for http testing 2025-06-14 23:09:35 +05:00
F4ilji 501e5487b9 small fixes 2025-06-14 19:33:49 +05:00
F4ilji c906314111 added changes in schedule component 2025-06-14 19:33:32 +05:00
F4ilji b1d5f4ed3d small changes 2025-06-14 19:32:38 +05:00
F4ilji 17392cbe25 added new constructor block and schedule upload page 2025-06-14 19:27:37 +05:00
F4ilji 4f6fcac02a cosmetic fixes 2025-06-14 19:26:24 +05:00