{"id":493987,"date":"2026-09-09T06:55:31","date_gmt":"2026-09-09T06:55:31","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=493987"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=493987","title":{"rendered":"\u041a\u0430\u043a \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0432\u044b\u043a\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u0430\u0445: \u043f\u0438\u0448\u0443\u0442 \u043a\u043e\u0434 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u0437\u0430\u0442\u0435\u043c \u043a\u043e\u0434 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044e\u0442 \u043d\u0430 \u0442\u0435\u0441\u0442\u0435, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u0435\u0434\u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0415\u0441\u043b\u0438 \u043d\u0430 \u044d\u0442\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0439 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0448\u0442\u0430\u0442\u043d\u043e, \u0442\u043e \u043e\u043d\u043e \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u0435.  <\/p>\n<p>\u041d\u043e, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u044b \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b. \u041d\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432 \u0438\u0445 \u0432\u044b\u0434\u0435\u043b\u044f\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0435, \u0430 \u043d\u0430 \u0442\u0435\u0441\u0442 \u0438 \u043f\u0440\u0435\u0434\u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432 &#8212; \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435. \u041f\u0440\u0438\u0447\u0435\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u0445\u043e\u0442\u044f\u0442 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440, \u0438 \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043d\u0430\u043b\u043e\u0433\u0430 \u043d\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0445\u043e\u0434 \u0432 \u0418\u0422-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0431\u0435\u0437 \u0431\u043e\u043b\u0438 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (\u0411\u0414) \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432 xls-\u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u0441\u0435\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0431\u0435\u0437 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u044e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f94\/351\/220\/f94351220c7736299beea76afc9f3b83.png\" alt=\" \u041b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u044b\" title=\" \u041b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u044b\" width=\"1000\" height=\"420\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f94\/351\/220\/f94351220c7736299beea76afc9f3b83.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f94\/351\/220\/f94351220c7736299beea76afc9f3b83.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> <em>\u041b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u044b<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u0448\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u043c\u0435\u0435\u0442 16 Gb \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 6 CPU, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 &#8212; 64 Gb RAM \u0438 12 CPU.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"center\">  <\/p>\n<\/td>\n<td>\n<p align=\"center\">Test<\/p>\n<\/td>\n<td>\n<p align=\"center\">Stage<\/p>\n<\/td>\n<td>\n<p align=\"center\">Prod<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">CPU<\/p>\n<\/td>\n<td>\n<p align=\"center\">6<\/p>\n<\/td>\n<td>\n<p align=\"center\">6<\/p>\n<\/td>\n<td>\n<p align=\"center\">12<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">RAM (Gb)<\/p>\n<\/td>\n<td>\n<p align=\"center\">16<\/p>\n<\/td>\n<td>\n<p align=\"center\">16<\/p>\n<\/td>\n<td>\n<p align=\"center\">64<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e \u0442\u043e\u0439, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u043c\u044b. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u044d\u0442\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0444\u0440\u043e\u043d\u0442\u043e\u043c \u0438 \u0431\u044d\u043a\u043e\u043c.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u043d\u0430\u0448\u0435\u043c \u043a\u0435\u0439\u0441\u0435. \u041c\u044b \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043d\u0430\u043b\u043e\u0433 \u043d\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0445\u043e\u0434 (\u041d\u0414\u0414). \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 &#8212; \u044d\u0442\u043e \u0440\u0430\u0441\u0447\u0435\u0442 \u041d\u0414\u0414, \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 xml\/xlsx, \u0440\u0430\u0441\u0447\u0435\u0442\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0441\u0432\u0435\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0423 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0435\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043d\u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u043a\u0430\u0436\u0434\u043e\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u0438 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e &#8212; \u044d\u0442\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0440\u0430\u0441\u0447\u0435\u0442\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 xls. \u0412 \u043d\u0435\u043c \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0417\u0430 \u0441\u0447\u0435\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0432 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0448\u0442\u0430\u0442\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041d\u043e \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e Pod \u0432 Deckhouse \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f.  <\/p>\n<p>\u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0438 \u043f\u0440\u0438\u0448\u043b\u0438 \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043a\u043e\u0433\u0434\u0430 \u0434\u043e\u0445\u043e\u0434\u0438\u0442 \u043b\u0438\u043c\u0438\u0442 \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438: \u0435\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 Deckhouse \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 Pod. \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 \u0431\u044b\u043b\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u043b\u0433\u0430\u044f \u0434\u0430\u0436\u0435 \u0432 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u0435. \u0417\u0430\u043d\u0438\u043c\u0430\u043b\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 30 \u043c\u0438\u043d\u0443\u0442 &#8212; \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u0434\u0435\u0440\u0436\u0430\u043b\u0438 http-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435 \u043d\u0430\u0436\u0438\u043c\u0430\u043b \u043a\u043d\u043e\u043f\u043a\u0443 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0448\u0435\u043b \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0431\u044d\u043a\u0435\u043d\u0434. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u044d\u0442\u0430 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u0430 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u043e\u0441\u043b\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u0434\u043e\u043b\u0433\u043e\u0433\u043e \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f.<\/p>\n<h2> \u041f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438<\/h2>\n<p> \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/54d\/053\/a33\/54d053a33b8f110a1ec768821349095e.png\" alt=\" \u0421\u0445\u0435\u043c\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438\" title=\" \u0421\u0445\u0435\u043c\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438\" width=\"532\" height=\"512\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/54d\/053\/a33\/54d053a33b8f110a1ec768821349095e.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/54d\/053\/a33\/54d053a33b8f110a1ec768821349095e.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> <em>\u0421\u0445\u0435\u043c\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438<\/em><\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0442\u0430\u043a\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 &#8212; \u044d\u0442\u043e \u0443\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043c\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0443\u0441\u0442\u043e\u0439 xls-\u0444\u0430\u0439\u043b \u0438 \u0434\u0435\u0440\u0436\u0430\u043b\u0438 \u0435\u0433\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u0422\u0443\u0442 \u0432\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u044a\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u0440\u043e\u0431\u0435\u0433\u0430\u0435\u043c\u0441\u044f \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432, \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0443 \u0411\u0414 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u043a\u0430\u043a \u043d\u043e\u0432\u044b\u0439 \u043b\u0438\u0441\u0442 \u0432 \u0444\u0430\u0439\u043b\u0435. \u0412\u0435\u0441\u044c \u044d\u0442\u043e\u0442 \u0446\u0438\u043a\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u043a\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0432 \u0441\u043f\u0438\u0441\u043a\u0435. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438\u0441\u044c, \u043c\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u0444\u0430\u0439\u043b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d, \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.<\/p>\n<pre><code class=\"python\">from io import BytesIOfrom flask import Responsefrom pandas import ExcelWriterfrom .api.app import crudfrom .api.models.registers._base_model_registers import RegistersModelfrom .api.views.base_api_resource import BaseApiResourcefrom .utils.excel_format import ExcelFormatfrom .utils.report_excel_writer import ReportExcelWriterclass ExportAllRegisters(BaseApiResource):def get(self) -&gt; Response:file = BytesIO()with ExcelWriter(file, engine=\"xlsxwriter\") as writer:formats = ExcelFormat(writer.book)list_models = [item for item in RegistersModel.__subclasses__()]for register_model in list_models:register_name = register_model.__tablename__actual_df = crud.get_actual_df(table_name=register_model.__tablename__,bu=bu,version=version,year=year,quarter=quarter,)report_writer = ReportExcelWriter(crud=crud,df=actual_df,db_object_name=register_name,writer=writer,formats=formats)report_writer.write()file.seek(0)return Response(file, mimetype=\"application\/octet-stream\")<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443 \u043d\u0430\u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 flask, \u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c endpoints.  <\/p>\n<ul>\n<li>\n<p><code>RegistersModel<\/code> &#8212; \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432.  <\/p>\n<\/li>\n<li>\n<p><code>BaseApiResource<\/code> &#8212; \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f endpoints.  <\/p>\n<\/li>\n<li>\n<p><code>ExcelFormat<\/code> &#8212; \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0434\u043b\u044f xls-\u0444\u0430\u0439\u043b\u043e\u0432.  <\/p>\n<\/li>\n<li>\n<p><code>ReportExcelWriter<\/code> &#8212; \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 xls, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u043d \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 crud, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0411\u0414 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 xls.  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435:<\/p>\n<\/li>\n<li>\n<p><code>df<\/code> &#8212; \u0441\u0430\u043c \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p><code>db_object_name<\/code> &#8212; \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430;<\/p>\n<\/li>\n<li>\n<p><code>writer<\/code> &#8212; \u043e\u0431\u044a\u0435\u043a\u0442 <code>ExcelWriter<\/code> \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b <code>formats<\/code>.  <\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0444\u0430\u0439\u043b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0444\u0440\u043e\u043d\u0442\u0443. \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0432 \u0442\u0430\u043a\u043e\u0439 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0435 \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0445\u0440\u0430\u043d\u0438\u043c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 xls, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438.<\/p>\n<p>\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043b\u0430\u0441\u0441 <code>RegisterModel<\/code> \u043a\u0430\u043a \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432. \u0414\u043b\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 xls-\u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u044b: <code>ExcelFormat<\/code> &#8212; \u0445\u0440\u0430\u043d\u0438\u0442 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 xlsx, <code>ReportExcelWriter<\/code> &#8212; \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044c \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0412 \u0442\u0430\u043a\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u043e\u0434\u043d\u0443 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0440\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0435. \u0418\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u0432\u0435\u0441\u044c \u0444\u0430\u0439\u043b \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, Pod \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b. \u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e, \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u0438\u0441\u0438\u0442 30-40 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<h2> \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u0438 \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0430\u0440\u0445\u0438\u0432. \u0414\u0430\u043b\u0435\u0435 \u0430\u0440\u0445\u0438\u0432 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430 \u0434\u0438\u0441\u043a, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0435\u0433\u043e \u043d\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c.  <\/p>\n<p>\u041a\u0430\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c:<\/p>\n<pre><code class=\"python\">from datetime import datetime, timezonefrom os import removefrom typing import Generatorfrom zipfile import ZIP_LZMA, ZipFilefrom flask import Response, stream_with_context<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p> \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438\u043c\u044f \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u0430.<\/p>\n<pre><code class=\"python\">curr_time = datetime.now(timezone.utc).strftime(\"%Y-%m-%d %H:%M:%S\")zip_file = ROOT_FOLDER \/ \"tmp\" \/ f\"all_registers_{curr_time}.zip\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041a\u0430\u043a \u0432\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c <code>get_actual_df<\/code>, \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0435\u043c\u0443 \u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b, \u0433\u043e\u0434, \u0432\u0435\u0440\u0441\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b. \u041c\u044b \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430, \u0447\u0442\u043e\u0431\u044b \u0445\u043e\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0435\u043e\u0440\u0438\u044f, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b \u043d\u0430 \u0434\u0438\u0441\u043a. \u041f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a endpoint \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0443\u0434\u0430\u043b\u044f\u043b\u0441\u044f.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u043b\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0432 \u0431\u043b\u043e\u043a \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0430.<\/p>\n<pre><code class=\"python\">with ZipFile(self.zip_file, mode=\"w\", compression=ZIP_LZMA, compresslevel=9) as zf:zf.writestr(data=register_file.getvalue(),zinfo_or_arcname=f\"{register_name}.xlsx\",compress_type=ZIP_LZMA,compresslevel=9,)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0414\u0443\u043c\u0430\u044f, \u0447\u0442\u043e, \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0430\u0440\u0445\u0438\u0432 \u043c\u044b \u0440\u0435\u0448\u0438\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043c\u044b \u043e\u0448\u0438\u0431\u043b\u0438\u0441\u044c. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043b\u0438 \u0438\u0437 \u0411\u0414 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u043e\u0440\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u044b \u0438\u0445 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043b\u0438, \u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b, \u0443 \u043d\u0430\u0441 \u0441\u043d\u043e\u0432\u0430 \u0431\u044b\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0441\u043a\u0430\u0447\u043a\u0438 \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>\u0422\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u043e\u0448\u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0437 \u0411\u0414 \u0438 \u043e\u0442\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0443 \u0411\u0414 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043f\u043e\u0440\u0446\u0438\u044f\u043c\u0438. \u0414\u0430\u043d\u043d\u044b\u0435 \u0443 \u043d\u0430\u0441 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043a\u0430\u043a \u043f\u043e \u043c\u0435\u0441\u044f\u0446\u0430\u043c, \u0442\u0430\u043a \u0438 \u043f\u043e \u043a\u0432\u0430\u0440\u0442\u0430\u043b\u0430\u043c. \u0415\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u043c\u0435\u0441\u044f\u0446\u0435\u043c, \u0430 \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u043c\u0435\u0441\u0442\u043e \u043c\u0435\u0441\u044f\u0446\u0430 \u043a\u0432\u0430\u0440\u0442\u0430\u043b. \u0412 \u043a\u0432\u0430\u0440\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043c\u0435\u043d\u044c\u0448\u0435, \u0430 \u0432 \u043c\u0435\u0441\u044f\u0447\u043d\u044b\u0445 &#8212; \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435. \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0438\u0437 \u0411\u0414 \u043d\u0435 \u0432\u0435\u0441\u044c \u043a\u0432\u0430\u0440\u0442\u0430\u043b \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0444\u0430\u0439\u043b \u043d\u0430 \u0442\u0440\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043d\u0430 \u0434\u0438\u0441\u043a.<\/p>\n<p>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043c\u0435\u0441\u044f\u0446\u0430 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b &#8212; <code>get_available_months<\/code>. \u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 &#8212; \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043a\u043e\u043b\u043e\u043d\u043a\u0430 \u00ab\u043c\u0435\u0441\u044f\u0446\u00bb, \u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u0441\u044f\u0446\u0430 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u0432\u0430\u0440\u0442\u0430\u043b\u0430, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 &#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u0443\u0441\u0442.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u0432\u0430\u0440\u0442\u0430\u043b\u0430, \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434 <code>get_rows_count<\/code>. \u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u0432\u0430\u0440\u0442\u0430\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0435\u0441\u0442\u044c \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0434\u043b\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0435\u0433\u043e \u0441\u0442\u0440\u043e\u043a \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441 \u043f\u043e\u0440\u043e\u0433\u043e\u043c.<\/p>\n<pre><code class=\"python\">rows_count = self._get_rows_count(model)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p> \u0418 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u044d\u0442\u043e.<\/p>\n<pre><code class=\"python\">if rows_count &gt; self.single_file_threshold:months_for_split = self._get_available_months(model)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p> \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430 \u0434\u0438\u0441\u043a \u0438 \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0432 \u0430\u0440\u0445\u0438\u0432.<\/p>\n<pre><code class=\"python\">zs = ZipStream(compress_type=ZIP_DEFLATED, compress_level=9)zs.add_path(xlsx_files_folder)with open(zip_file_name, \"wb\") as zfile:zfile.writelines(zs)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p> \u0422\u0430\u043a\u0436\u0435 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 try:<\/p>\n<pre><code class=\"python\">try:\u2026except Exception:raisefinally:shutil.rmtree(xlsx_files_folder)log_info(f\"\u0423\u0434\u0430\u043b\u0435\u043d\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043f\u0430\u043f\u043a\u0430 {xlsx_files_folder} \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f XLSX.\")alive_tables_helper.clear_gen_zip_alive_status()<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0438 \u043b\u044e\u0431\u043e\u043c \u0438\u0441\u0445\u043e\u0434\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0438 \u0443\u0431\u0440\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<p>\u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u041d\u0414\u0414 \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c \u0440\u0430\u0441\u0447\u0435\u0442 \u041d\u0414\u0414 \u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438. \u0410 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0432\u0441\u0435\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 &#8212; \u044d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0430\u0440\u0445\u0438\u0432\u0430 \u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430. \u0410 \u0435\u0441\u043b\u0438 \u0440\u0430\u0441\u0447\u0435\u0442 \u0435\u0449\u0435 \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0441\u044f \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430, \u0442\u043e \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043d\u0435\u0447\u0435\u0433\u043e. \u041f\u043e\u043c\u0438\u043c\u043e \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0430\u0440\u0445\u0438\u0432\u0430, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e 30 \u043c\u0438\u043d\u0443\u0442 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043a\u0440\u0443\u0442\u044f\u0449\u0435\u0435\u0441\u044f \u043a\u043e\u043b\u0435\u0441\u0438\u043a\u043e.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0442\u0430\u0442\u0443\u0441\u044b \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043e\u043f\u043e\u0432\u0435\u0449\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0448\u0430\u0433\u0430\u0445.<\/p>\n<pre><code class=\"python\">from enum import Enumclass GeneratedZipSteps(Enum):calculation_alive = \"\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438 \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 zip \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e.\"start_creating_zip = \"\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0437\u0430\u043f\u0443\u0441\u043a \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f zip.\"download_register_from_db = \"\u0420\u0435\u0433\u0438\u0441\u0442\u0440 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0411\u0414.\"save_register_on_disk = \"\u0420\u0435\u0433\u0438\u0441\u0442\u0440 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0438\u0441\u043a.\"create_zip = \"\u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0430\u0440\u0445\u0438\u0432 \u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438.\"unable_to_generate_file = \"\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c zip \u0438\u0437-\u0437\u0430 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0438 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430.\"pipeline_has_not_been_run_yet = \"\u041f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0435\u0449\u0435 \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u0431\u044b\u043b \u0437\u0430\u043f\u0443\u0449\u0435\u043d.\"pipeline_has_been_run_while_zip_generating = \"\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f zip \u0431\u044b\u043b \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0440\u0430\u0441\u0447\u0435\u0442\u0430\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0423 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0431\u044b\u043b\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0445\u0440\u0430\u043d\u0438\u043b\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u044b \u0440\u0430\u0441\u0447\u0435\u0442\u0430. \u0410 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b \u0445\u0440\u0430\u043d\u0438\u043b\u0430 \u0441\u0442\u0430\u0442\u0443\u0441 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0430\u0440\u0445\u0438\u0432\u0430, \u043d\u0435 \u0431\u044b\u043b\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0435 \u0442\u043e\u0436\u0435 \u0437\u0430\u0432\u0435\u0434\u0435\u043c. \u0422\u0430\u043a \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0433\u0434\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u0445\u043e\u0447\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0436\u0435 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0443.<\/p>\n<pre><code class=\"python\">class User(Base):__tablename__ = \"gen_zip_alive_status\"code_bu = Column(String(10), primary_key=True)version = Column(Integer,primary_key=True)year = Column(Integer,primary_key=True)quarter = Column(Integer, primary_key=True)status = Column(String(100), nullable=False)register = Column(String(20), nullable=False)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0448\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b &#8212; \u044d\u0442\u043e \u0411\u0415, \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0433\u043e\u0434 \u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b, \u0442\u043e \u0438\u0445 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0439 \u043a\u043b\u044e\u0447. \u0422\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0440\u0430\u0441\u0447\u0435\u0442 \u0438\u043b\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0440\u0445\u0438\u0432\u0430.<\/p>\n<pre><code class=\"python\">class AliveTablesHelper:def __init__(self, bu: str, version: int, year: int, quarter: int):self.bu = buself.version = versionself.year = yearself.quarter = quarter<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p> \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u044b:  <\/p>\n<ul>\n<li>\n<p> <code>check_calc_alive<\/code> &#8212; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 True\/False \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0440\u0430\u0441\u0447\u0435\u0442 \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0438\u043b\u0438 \u043d\u0435\u0442;<\/p>\n<\/li>\n<li>\n<p> <code>check_gen_zip_alive<\/code> &#8212; \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u043b\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 zip;<\/p>\n<\/li>\n<li>\n<p> <code>get_current_status<\/code> &#8212; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f zip-\u0430\u0440\u0445\u0438\u0432\u0430;<\/p>\n<\/li>\n<li>\n<p> <code>clear_gen_zip_alive_status<\/code> &#8212; \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f zip;<\/p>\n<\/li>\n<li>\n<p> <code>write_gen_zip_alive_status_to_db<\/code> &#8212; \u043f\u0438\u0448\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0411\u0415, \u0433\u043e\u0434\u0430, \u0432\u0435\u0440\u0441\u0438\u0438, \u043a\u0432\u0430\u0440\u0442\u0430\u043b\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043b\u0430\u0441\u0441 \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0430\u0440\u0445\u0438\u0432\u0430, \u0447\u0435\u043c \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u0432 \u0440\u0430\u0441\u0447\u0435\u0442\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0442\u0443\u0441, \u0430 \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0430\u0440\u0445\u0438\u0432\u0430 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 endpoint.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c, \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441.<\/p>\n<pre><code class=\"python\">def _get_file(self) -&gt; Union[Path, None]:mask = self.file_mask + \"_*\" + self.file_extensionlist_of_files = glob(os.path.join(self.root_path,mask,))# \u0444\u0430\u0439\u043b \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0434\u0438\u043dsorted_files = sorted(list_of_files, key=os.path.getmtime, reverse=True)if sorted_files:return Path(sorted_files[0])return None<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u043f\u043e \u043c\u0430\u0441\u043a\u0435 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435. \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u0443\u0436\u0435 \u0435\u0441\u0442\u044c &#8212; \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0441\u043d\u043e\u0432\u0430. \u0412\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0431\u044b\u043b \u043b\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0440\u0430\u0441\u0447\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u043d\u0430 \u0434\u0438\u0441\u043a. \u0415\u0441\u043b\u0438 \u0440\u0430\u0441\u0447\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0441\u044f &#8212; \u0444\u0430\u0439\u043b \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u0431\u044b\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c. \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0435\u0442\u043a\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430.<\/p>\n<pre><code class=\"python\">def is_file_exist(self) -&gt; bool:if self._get_file():return Truereturn False<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u043e\u043d \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 &#8212; \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u043c\u044b \u0441\u0440\u0430\u0437\u0443 \u043c\u043e\u0436\u0435\u043c \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.<\/p>\n<pre><code class=\"python\">def get_file_name_size(self) -&gt; Tuple[str, int]:file_path = self._get_file()if not file_path:raise FileNotFoundError(\"\u0424\u0430\u0439\u043b \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.\")file_size = os.path.getsize(file_path)file_name = file_path.namereturn file_name, file_size<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0438 \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0444\u0440\u043e\u043d\u0442\u0443.<\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u0438 \u0441\u0442\u0430\u0442\u0443\u0441 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443. \u0418 \u0435\u0433\u043e \u043c\u044b \u0442\u043e\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u043c\u0435\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0448\u0430\u0433\u0430 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0438\u0437 \u044d\u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b &#8212; <code>get_pipeline_last_time_run<\/code>. \u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u044d\u0442\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0438 \u0431\u0440\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u041d\u0414\u0414.<\/p>\n<p>\u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0442\u043e\u0442 \u0430\u0440\u0445\u0438\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0435\u0439\u0447\u0430\u0441 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435, \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c.<\/p>\n<pre><code class=\"python\">def is_zip_actual(self) -&gt; bool:# \u0434\u0430\u0442\u0443 \u0444\u0430\u0439\u043b\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430file_path = self._get_file()if not file_path:    return Falsefile_date_str = file_path.name.replace(self.file_mask + \"_\", \"\").replace(self.file_extension, \"\")file_date = datetime.strptime(file_date_str, self.date_format)pipeline_status_last_run = self.get_pipeline_last_time_run()if not pipeline_status_last_run:return Falseif file_date &gt; pipeline_status_last_run:return Truereturn False<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 &#8212; \u044d\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0430.<\/p>\n<pre><code class=\"python\">def _generate_zip(self, app_context: \"AppContext\") -&gt; None:<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u043e\u0442\u043e\u043a\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/p>\n<pre><code class=\"python\">curr_time = datetime.now(timezone.utc)curr_time_formatted = curr_time.strftime(self.date_format)xlsx_files_folder = self.root_path \/ Path(f\"{self.file_mask}_{curr_time_formatted}\")zip_file_name = self.root_path \/ Path(f\"{self.file_mask}_{curr_time_formatted}\" + self.file_extension)app_context.push()file_path = self._get_file()if file_path and os.path.isfile(file_path):os.remove(file_path)log_info(f\"\u0424\u0430\u0439\u043b {file_path} \u0443\u0434\u0430\u043b\u0435\u043d.\")xlsx_files_folder.mkdir(parents=True, exist_ok=True)log_info(f\"\u0421\u043e\u0437\u0434\u0430\u043d\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043f\u0430\u043f\u043a\u0430 {xlsx_files_folder} \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f XLSX.\")<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0444\u0430\u0439\u043b\u0430. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u043f\u0430\u043f\u043a\u0443, \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0432\u0441\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b. \u0414\u0430\u043b\u0435\u0435 \u0438\u0437 \u043d\u0435\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0432, \u0430 \u043f\u0430\u043f\u043a\u0443 \u0443\u0434\u0430\u043b\u0438\u043c. \u0415\u0441\u043b\u0438 \u0430\u0440\u0445\u0438\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 &#8212; \u0443\u0434\u0430\u043b\u0438\u043c \u0435\u0433\u043e. \u0421\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043c\u044b \u0437\u0430\u0448\u043b\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u0442\u043e \u043c\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b (\u043e\u043d \u0443\u0441\u0442\u0430\u0440\u0435\u043b).<\/p>\n<pre><code class=\"python\">self.registers = [model.__tablename__ for model in RegistersModel.__subclasses__()]alive_tables_helper = AliveTablesHelper(self.bu, self.version, self.year, self.quarter)log_info(f\"Registers to save: {self.registers}\")<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0438 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0434\u043b\u044f <code>AliveTablesHelper<\/code>.<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0431\u0435\u0436\u0438\u043c\u0441\u044f \u043f\u043e \u0432\u0441\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c <code>for register_name in self.registers<\/code>.<\/p>\n<p>\u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u043b\u0438 \u0440\u0430\u0441\u0447\u0435\u0442. \u042d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0434\u043b\u044f \u043d\u0430\u0441, \u0438 \u0435\u0441\u043b\u0438 \u043e\u043d \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f, \u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d, \u0430 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0430.<\/p>\n<pre><code class=\"python\">if alive_tables_helper.check_calc_alive():raise <\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p> \u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<pre><code class=\"python\">alive_tables_helper.write_gen_zip_alive_status_to_db(GeneratedZipSteps.download_register_from_db.value, register_name)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c <code>months_for_split<\/code> &#8212; \u0437\u043d\u0430\u0447\u0438\u0442, \u0443 \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0430\u0445 \u0435\u0441\u0442\u044c \u043c\u0435\u0441\u044f\u0446 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0440\u043e\u0433\u0430. \u041d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<pre><code class=\"python\">month_column_name = model.__table__.columns.get(MONTH_FIELD_NAME).namefor month in months_for_split:filters[month_column_name] = str(month)xlsx_path = xlsx_files_folder \/ f\"{register_name}_{month}.xlsx\"df = crud.get_actual_df(table_name=register_name,bu=bu,version=version,year=year,quarter=quarter,filters=filters,)log_info(f\"Register {register_name} was downloaded from DB. Month: {month}.\")alive_tables_helper.write_gen_zip_alive_status_to_db(GeneratedZipSteps.save_register_on_disk.value, register_name)with ExcelWriter(xlsx_path, engine=\"xlsxwriter\") as writer:formats = ExcelFormat(writer.book)ReportExcelWriter(crud=crud, df=df, db_object_name=register_name, writer=writer, formats=formats).write()log_info(f\"Register {register_name} was saved on disk. Month: {month}.\")del filters[month_column_name]del df<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0432\u0441\u0435 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u0432 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, \u043d\u043e \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0444\u0438\u043b\u044c\u0442\u0440 \u043f\u043e \u043c\u0435\u0441\u044f\u0446\u0443 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443. \u0412\u0430\u0436\u043d\u044b\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0446\u0435 <code>filters<\/code> &#8212; \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043d\u0435 \u043d\u0430\u0447\u0430\u043b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0435\u0441\u043b\u0438 \u0442\u0430\u043c \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e\u0440\u043e\u0433\u0430.<\/p>\n<pre><code class=\"python\">xlsx_path = xlsx_files_folder \/ f\"{register_name}.xlsx\"df = crud.get_actual_df(  table_name=register_name,  bu=bu,  version=version,  year=year,  quarter=quarter)log_info(f\"Register {register_name} was downloaded from DB.\")with ExcelWriter(xlsx_path, engine=\"xlsxwriter\") as writer:formats = ExcelFormat(writer.book)ReportExcelWriter(crud=crud, df=df, db_object_name=register_name, writer=writer, formats=formats).write()del dfalive_tables_helper.write_gen_zip_alive_status_to_db(GeneratedZipSteps.save_register_on_disk.value, register_name)log_info(f\"Register {register_name} was saved on disk.\")<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p> \u0414\u043b\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430.<\/p>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0442\u0434\u0430\u0447\u0443 \u0444\u0430\u0439\u043b\u0430.<\/p>\n<pre><code class=\"python\">@stream_with_contextdef file_streamer(self) -&gt; Iterator[bytes]:file_path = self._get_file()if not file_path:raise FileNotFoundError(\u0424\u0430\u0439\u043b \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.\")with open(file_path, \"rb\") as file:while True:data = file.read(self.chunk_size)if not data:breakyield dat<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p> \u0418 \u0437\u0430\u043f\u0443\u0441\u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435.<\/p>\n<pre><code class=\"python\">def run_thread_for_generate_zip(self) -&gt; None:app_context = current_app.app_context()build_thread = threading.Thread(target=self._generate_zip,kwargs={                \"app_context\": app_context,        },      daemon=True,    )    build_thread.start()<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0432 \u043d\u0430\u0448\u0435\u043c endpoint, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443:<\/p>\n<p>1. \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0440\u0430\u0441\u0447\u0435\u0442 &#8212; \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430.<\/p>\n<p>2. \u0415\u0441\u043b\u0438 \u0440\u0430\u0441\u0447\u0435\u0442 \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0441\u044f &#8212; \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e.<\/p>\n<p>3. \u0415\u0441\u043b\u0438 \u0430\u0440\u0445\u0438\u0432 \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f &#8212; \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430.<\/p>\n<p>4. \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u043e\u043d \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 &#8212; \u0432\u0435\u0440\u043d\u0435\u043c \u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.<\/p>\n<p>5. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043b\u0438 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 &#8212; \u0435\u0441\u043b\u0438 \u043c\u0435\u0441\u0442\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0432\u0435\u0440\u043d\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443.<\/p>\n<p>6. \u0417\u0430\u043f\u0438\u0448\u0435\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0411\u0414 \u0441\u0442\u0430\u0442\u0443\u0441, \u0447\u0442\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c, \u0438 \u043d\u0430\u0447\u043d\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b.<\/p>\n<p>Endpoint \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043a\u043e\u0433\u0434\u0430 \u0443 \u0432\u0430\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b.<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u043e\u0432\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0442\u0430\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/efd\/9a8\/115\/efd9a811595d9242d45ad49817655fdb.png\" alt=\" \u041d\u043e\u0432\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445\" title=\" \u041d\u043e\u0432\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445\" width=\"542\" height=\"582\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/efd\/9a8\/115\/efd9a811595d9242d45ad49817655fdb.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/efd\/9a8\/115\/efd9a811595d9242d45ad49817655fdb.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption> <em>\u041d\u043e\u0432\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/em><\/figcaption><\/div>\n<\/figure>\n<h2> Cronjob<\/h2>\n<p>\u0420\u0435\u0448\u0438\u0432 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u043d\u0430 \u0434\u0438\u0441\u043a, \u043c\u044b \u0437\u0430\u0434\u0430\u043b\u0438 \u0441\u0435\u0431\u0435 \u0432\u043e\u043f\u0440\u043e\u0441, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u043a\u0430\u0442\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e: \u00ab\u0427\u0442\u043e \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0441\u044f?\u00bb.  <\/p>\n<p>\u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0432\u044b \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0445 \u0432\u0435\u0447\u043d\u043e. \u041a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b, \u043e\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0432\u0435\u0440\u0441\u0438\u0438 \u0430\u0440\u0445\u0438\u0432\u043e\u0432 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u0441\u0442\u0430\u0440\u044b\u0445 \u0430\u0440\u0445\u0438\u0432\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 cronjob. \u041e\u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437 \u0432 \u043d\u0435\u0434\u0435\u043b\u044e \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0430\u0440\u0445\u0438\u0432\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0435\u0436\u0430\u0442 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u0434\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e. \u042d\u0442\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043c\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0438\u0441\u043a\u0430. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0435 \u0430\u0440\u0445\u0438\u0432\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c\u044e \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043d\u043e \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0442\u0430\u043a\u0442\u0438\u043a\u0430, \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u043d\u0430\u043c\u0438, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<h2> \u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u042d\u0442\u0438\u043c \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 Pod \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0438 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e. \u0412 \u043d\u043e\u0432\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 20 \u043c\u0438\u043d\u0443\u0442 \u0432\u043c\u0435\u0441\u0442\u043e 30, \u043c\u044b \u043d\u0435 \u0434\u0435\u0440\u0436\u0438\u043c \u0442\u0430\u043a \u0434\u043e\u043b\u0433\u043e http-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435, \u0430 \u0444\u0440\u043e\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 ping pong &#8212; \u043e\u043d \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0443 \u0431\u044d\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e.  <\/p>\n<ul>\n<li>\n<p> \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0448\u0435\u043b \u0441\u0442\u0430\u0442\u0443\u0441 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 &#8212; \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.  <\/p>\n<\/li>\n<li>\n<p> \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0448\u0435\u043b \u0444\u0430\u0439\u043b &#8212; \u043e\u0442\u0434\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.  <\/p>\n<\/li>\n<li>\n<p> \u0415\u0441\u043b\u0438 \u0432\u0435\u0440\u043d\u0443\u043b\u0430\u0441\u044c \u043e\u0448\u0438\u0431\u043a\u0430 &#8212; \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0435\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0435\u0441\u043b\u0438 \u0430\u0440\u0445\u0438\u0432 \u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438 \u0443\u0436\u0435 \u0431\u044b\u043b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d, \u043e\u0442\u0434\u0430\u0434\u0438\u043c \u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e, \u043d\u0435 \u0437\u0430\u0442\u0440\u0430\u0447\u0438\u0432\u0430\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435, \u043a\u0430\u043a \u0440\u0430\u043d\u044c\u0448\u0435.  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441 \u0441 \u0447\u0440\u0435\u0437\u043c\u0435\u0440\u043d\u044b\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435\u043c RAM. \u0420\u0430\u043d\u044c\u0448\u0435 \u043c\u044b \u043d\u0430 \u0431\u044d\u043a\u0435\u043d\u0434 \u043e\u0442\u0432\u043e\u0434\u0438\u043b\u0438 12 Gb \u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e. \u0421\u0435\u0439\u0447\u0430\u0441 \u0436\u0435 \u0432 \u043f\u0438\u043a\u0435 \u043c\u044b \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u043c \u0434\u043e 3.5 Gb. \u0417\u0430 \u0441\u0447\u0435\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438, \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u0443\u0448\u043b\u0438 \u043e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 Pod.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"center\">  <\/p>\n<\/td>\n<td>\n<p align=\"center\"> \u0414\u041e<\/p>\n<\/td>\n<td>\n<p align=\"center\"> \u041f\u043e\u0441\u043b\u0435<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\"> \u041f\u0435\u0440\u0432\u0430\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430<\/p>\n<\/td>\n<td>\n<p align=\"center\"> ~30 \u043c\u0438\u043d<\/p>\n<\/td>\n<td>\n<p align=\"center\"> \u0414\u043e 20 \u043c\u0438\u043d<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">\u041f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430<\/p>\n<\/td>\n<td>\n<p align=\"center\"> ~30 \u043c\u0438\u043d<\/p>\n<\/td>\n<td>\n<p align=\"center\"> \u041c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 Pod<\/p>\n<\/td>\n<td>\n<p align=\"center\">\u041f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0435<\/p>\n<\/td>\n<td>\n<p align=\"center\"> 0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"center\">RAM<\/p>\n<\/td>\n<td>\n<p align=\"center\"> \u041d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e 12 Gb<\/p>\n<\/td>\n<td>\n<p align=\"center\"> \u041c\u0435\u043d\u0435\u0435 3.5 Gb<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441\u0442\u0430\u0442\u0443\u0441 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0430\u0440\u0445\u0438\u0432\u0430 \u0438 \u0441\u0442\u0430\u0442\u0443\u0441-\u0431\u0430\u0440. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430, \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0435\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a05\/b33\/f3c\/a05b33f3c038528fb306ed6d22b5d3ca.png\" alt=\"\u0421\u0442\u0430\u0442\u0443\u0441\u044b \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438\" title=\"\u0421\u0442\u0430\u0442\u0443\u0441\u044b \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438\" width=\"385\" height=\"307\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/a05\/b33\/f3c\/a05b33f3c038528fb306ed6d22b5d3ca.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a05\/b33\/f3c\/a05b33f3c038528fb306ed6d22b5d3ca.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u0442\u0430\u0442\u0443\u0441\u044b \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438<\/figcaption><\/div>\n<\/figure>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1080128\/\">https:\/\/habr.com\/ru\/articles\/1080128\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0432\u044b\u043a\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u0430\u0445: \u043f\u0438\u0448\u0443\u0442 \u043a\u043e\u0434 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u0437\u0430\u0442\u0435\u043c \u043a\u043e\u0434 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044e\u0442 \u043d\u0430 \u0442\u0435\u0441\u0442\u0435, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u0435\u0434\u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0415\u0441\u043b\u0438 \u043d\u0430 \u044d\u0442\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0439 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0448\u0442\u0430\u0442\u043d\u043e, \u0442\u043e \u043e\u043d\u043e \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u0435.  \u041d\u043e, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u044b \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b. \u041d\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432 \u0438\u0445 \u0432\u044b\u0434\u0435\u043b\u044f\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0435, \u0430 \u043d\u0430 \u0442\u0435\u0441\u0442 \u0438 \u043f\u0440\u0435\u0434\u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432 &#8212; \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435. \u041f\u0440\u0438\u0447\u0435\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u0431\u0438\u0437\u043d\u0435\u0441-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u0445\u043e\u0442\u044f\u0442 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438.\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440, \u0438 \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043d\u0430\u043b\u043e\u0433\u0430 \u043d\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0445\u043e\u0434 \u0432 \u0418\u0422-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0431\u0435\u0437 \u0431\u043e\u043b\u0438 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (\u0411\u0414) \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432 xls-\u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u0441\u0435\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0431\u0435\u0437 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u044e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041b\u0430\u043d\u0434\u0448\u0430\u0444\u0442\u044b\u041d\u0430\u0448\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u043c\u0435\u0435\u0442 16 Gb \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 6 CPU, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 &#8212; 64 Gb RAM \u0438 12 CPU.   TestStageProdCPU6612RAM (Gb)161664\u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e \u0442\u043e\u0439, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u043c\u044b. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u044d\u0442\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0444\u0440\u043e\u043d\u0442\u043e\u043c \u0438 \u0431\u044d\u043a\u043e\u043c.\u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u043d\u0430\u0448\u0435\u043c \u043a\u0435\u0439\u0441\u0435. \u041c\u044b \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043d\u0430\u043b\u043e\u0433 \u043d\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0445\u043e\u0434 (\u041d\u0414\u0414). \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 &#8212; \u044d\u0442\u043e \u0440\u0430\u0441\u0447\u0435\u0442 \u041d\u0414\u0414, \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 xml\/xlsx, \u0440\u0430\u0441\u0447\u0435\u0442\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0441\u0432\u0435\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0423 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0435\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043d\u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u043a\u0430\u0436\u0434\u043e\u0435 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u0438 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e &#8212; \u044d\u0442\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0440\u0430\u0441\u0447\u0435\u0442\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 xls. \u0412 \u043d\u0435\u043c \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0417\u0430 \u0441\u0447\u0435\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0432 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0448\u0442\u0430\u0442\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041d\u043e \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e Pod \u0432 Deckhouse \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f.  \u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0438 \u043f\u0440\u0438\u0448\u043b\u0438 \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043a\u043e\u0433\u0434\u0430 \u0434\u043e\u0445\u043e\u0434\u0438\u0442 \u043b\u0438\u043c\u0438\u0442 \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438: \u0435\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 Deckhouse \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 Pod. \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 \u0431\u044b\u043b\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u043b\u0433\u0430\u044f \u0434\u0430\u0436\u0435 \u0432 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u0435. \u0417\u0430\u043d\u0438\u043c\u0430\u043b\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 30 \u043c\u0438\u043d\u0443\u0442 &#8212; \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u0434\u0435\u0440\u0436\u0430\u043b\u0438 http-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0444\u0440\u043e\u043d\u0442\u0435 \u043d\u0430\u0436\u0438\u043c\u0430\u043b \u043a\u043d\u043e\u043f\u043a\u0443 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0448\u0435\u043b \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0431\u044d\u043a\u0435\u043d\u0434. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u044d\u0442\u0430 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u0430 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u043e\u0441\u043b\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u0434\u043e\u043b\u0433\u043e\u0433\u043e \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f. \u041f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0442\u0430\u043a: \u0421\u0445\u0435\u043c\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0442\u0430\u043a\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 &#8212; \u044d\u0442\u043e \u0443\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043c\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0443\u0441\u0442\u043e\u0439 xls-\u0444\u0430\u0439\u043b \u0438 \u0434\u0435\u0440\u0436\u0430\u043b\u0438 \u0435\u0433\u043e \u0432 \u043f\u0430\u043c\u044f\u0442\u0438. \u0422\u0443\u0442 \u0432\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u044a\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u0440\u043e\u0431\u0435\u0433\u0430\u0435\u043c\u0441\u044f \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432, \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0443 \u0411\u0414 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u043a\u0430\u043a \u043d\u043e\u0432\u044b\u0439 \u043b\u0438\u0441\u0442 \u0432 \u0444\u0430\u0439\u043b\u0435. \u0412\u0435\u0441\u044c \u044d\u0442\u043e\u0442 \u0446\u0438\u043a\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u043a\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0432 \u0441\u043f\u0438\u0441\u043a\u0435. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438\u0441\u044c, \u043c\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u0444\u0430\u0439\u043b \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d, \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.from io import BytesIOfrom flask import Responsefrom pandas import ExcelWriterfrom .api.app import crudfrom .api.models.registers._base_model_registers import RegistersModelfrom .api.views.base_api_resource import BaseApiResourcefrom .utils.excel_format import ExcelFormatfrom .utils.report_excel_writer import ReportExcelWriterclass ExportAllRegisters(BaseApiResource):def get(self) -&gt; Response:file = BytesIO()with ExcelWriter(file, engine=&#187;xlsxwriter&#187;) as writer:formats = ExcelFormat(writer.book)list_models = [item for item in RegistersModel.__subclasses__()]for register_model in list_models:register_name = register_model.__tablename__actual_df = crud.get_actual_df(table_name=register_model.__tablename__,bu=bu,version=version,year=year,quarter=quarter,)report_writer = ReportExcelWriter(crud=crud,df=actual_df,db_object_name=register_name,writer=writer,formats=formats)report_writer.write()file.seek(0)return Response(file, mimetype=&#187;application\/octet-stream&#187;)\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443 \u043d\u0430\u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 flask, \u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c endpoints.  RegistersModel &#8212; \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432.  BaseApiResource &#8212; \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f endpoints.  ExcelFormat &#8212; \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0434\u043b\u044f xls-\u0444\u0430\u0439\u043b\u043e\u0432.  ReportExcelWriter &#8212; \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 xls, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u043d \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 crud, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0411\u0414 \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 xls.  \u0422\u0430\u043a\u0436\u0435:df &#8212; \u0441\u0430\u043c \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438;db_object_name &#8212; \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430;writer &#8212; \u043e\u0431\u044a\u0435\u043a\u0442 ExcelWriter \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b formats.  \u0414\u0430\u043b\u0435\u0435 \u0444\u0430\u0439\u043b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0444\u0440\u043e\u043d\u0442\u0443. \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0432 \u0442\u0430\u043a\u043e\u0439 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0435 \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0445\u0440\u0430\u043d\u0438\u043c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 xls, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438.\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043b\u0430\u0441\u0441 RegisterModel \u043a\u0430\u043a \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432. \u0414\u043b\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 xls-\u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u044b: ExcelFormat &#8212; \u0445\u0440\u0430\u043d\u0438\u0442 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 xlsx, ReportExcelWriter &#8212; \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044c \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.\u0412 \u0442\u0430\u043a\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u043e\u0434\u043d\u0443 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0440\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0435. \u0418\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u0432\u0435\u0441\u044c \u0444\u0430\u0439\u043b \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, Pod \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b. \u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e, \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u0438\u0441\u0438\u0442 30-40 \u043c\u0438\u043d\u0443\u0442. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f\u041f\u0435\u0440\u0432\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u0438 \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0430\u0440\u0445\u0438\u0432. \u0414\u0430\u043b\u0435\u0435 \u0430\u0440\u0445\u0438\u0432 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430 \u0434\u0438\u0441\u043a, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0435\u0433\u043e \u043d\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c.  \u041a\u0430\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c:from datetime import datetime, timezonefrom os import removefrom typing import Generatorfrom zipfile import ZIP_LZMA, ZipFilefrom flask import Response, stream_with_context \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438\u043c\u044f \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u0430.curr_time = datetime.now(timezone.utc).strftime(&#171;%Y-%m-%d %H:%M:%S&#187;)zip_file = ROOT_FOLDER \/ &#171;tmp&#187; \/ f&#187;all_registers_{curr_time}.zip&#187;\u041a\u0430\u043a \u0432\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c get_actual_df, \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0435\u043c\u0443 \u0431\u0430\u043b\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b, \u0433\u043e\u0434, \u0432\u0435\u0440\u0441\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b. \u041c\u044b \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430, \u0447\u0442\u043e\u0431\u044b \u0445\u043e\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0431\u0443\u0434\u0435\u0442 \u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0435\u043e\u0440\u0438\u044f, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b \u043d\u0430 \u0434\u0438\u0441\u043a. \u041f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a endpoint \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0443\u0434\u0430\u043b\u044f\u043b\u0441\u044f.\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u043b\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0432 \u0431\u043b\u043e\u043a \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0430.with ZipFile(self.zip_file, mode=&#187;w&#187;, compression=ZIP_LZMA, compresslevel=9) as zf:zf.writestr(data=register_file.getvalue(),zinfo_or_arcname=f&#187;{register_name}.xlsx&#187;,compress_type=ZIP_LZMA,compresslevel=9,)\u0414\u0443\u043c\u0430\u044f, \u0447\u0442\u043e, \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0430\u0440\u0445\u0438\u0432 \u043c\u044b \u0440\u0435\u0448\u0438\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043c\u044b \u043e\u0448\u0438\u0431\u043b\u0438\u0441\u044c. \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043b\u0438 \u0438\u0437 \u0411\u0414 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u043e\u0440\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u044b \u0438\u0445 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043b\u0438, \u0430 \u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u044b, \u0443 \u043d\u0430\u0441 \u0441\u043d\u043e\u0432\u0430 \u0431\u044b\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0441\u043a\u0430\u0447\u043a\u0438 \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438.\u0422\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u043e\u0448\u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0437 \u0411\u0414 \u0438 \u043e\u0442\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0443 \u0411\u0414 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043f\u043e\u0440\u0446\u0438\u044f\u043c\u0438. \u0414\u0430\u043d\u043d\u044b\u0435 \u0443 \u043d\u0430\u0441 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043a\u0430\u043a \u043f\u043e \u043c\u0435\u0441\u044f\u0446\u0430\u043c, \u0442\u0430\u043a \u0438 \u043f\u043e \u043a\u0432\u0430\u0440\u0442\u0430\u043b\u0430\u043c. \u0415\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u043c\u0435\u0441\u044f\u0446\u0435\u043c, \u0430 \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u043c\u0435\u0441\u0442\u043e \u043c\u0435\u0441\u044f\u0446\u0430 \u043a\u0432\u0430\u0440\u0442\u0430\u043b. \u0412 \u043a\u0432\u0430\u0440\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043c\u0435\u043d\u044c\u0448\u0435, \u0430 \u0432 \u043c\u0435\u0441\u044f\u0447\u043d\u044b\u0445 &#8212; \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435. \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0438\u0437 \u0411\u0414 \u043d\u0435 \u0432\u0435\u0441\u044c \u043a\u0432\u0430\u0440\u0442\u0430\u043b \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0444\u0430\u0439\u043b \u043d\u0430 \u0442\u0440\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043d\u0430 \u0434\u0438\u0441\u043a.\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043c\u0435\u0441\u044f\u0446\u0430 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b &#8212; get_available_months. \u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 &#8212; \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043a\u043e\u043b\u043e\u043d\u043a\u0430 \u00ab\u043c\u0435\u0441\u044f\u0446\u00bb, \u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u0441\u044f\u0446\u0430 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u0432\u0430\u0440\u0442\u0430\u043b\u0430, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 &#8212; \u0441\u043f\u0438\u0441\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u0443\u0441\u0442.\u0427\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u0432\u0430\u0440\u0442\u0430\u043b\u0430, \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434 get_rows_count. \u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u0440\u043e\u043a \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u0432\u0430\u0440\u0442\u0430\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0435\u0441\u0442\u044c \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0434\u043b\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.\u041f\u043e\u043b\u0443\u0447\u0438\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0435\u0433\u043e \u0441\u0442\u0440\u043e\u043a \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441 \u043f\u043e\u0440\u043e\u0433\u043e\u043c.rows_count = self._get_rows_count(model) \u0418 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u044d\u0442\u043e.if rows_count &gt; self.single_file_threshold:months_for_split = self._get_available_months(model) \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430 \u0434\u0438\u0441\u043a \u0438 \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0432 \u0430\u0440\u0445\u0438\u0432.zs = ZipStream(compress_type=ZIP_DEFLATED, compress_level=9)zs.add_path(xlsx_files_folder)with open(zip_file_name, &#171;wb&#187;) as zfile:zfile.writelines(zs) \u0422\u0430\u043a\u0436\u0435 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 try:try:\u2026except Exception:raisefinally:shutil.rmtree(xlsx_files_folder)log_info(f&#187;\u0423\u0434\u0430\u043b\u0435\u043d\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043f\u0430\u043f\u043a\u0430 {xlsx_files_folder} \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f XLSX.&#187;)alive_tables_helper.clear_gen_zip_alive_status()\u041f\u0440\u0438 \u043b\u044e\u0431\u043e\u043c \u0438\u0441\u0445\u043e\u0434\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0438 \u0443\u0431\u0440\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.\u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u041d\u0414\u0414 \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c \u0440\u0430\u0441\u0447\u0435\u0442 \u041d\u0414\u0414 \u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438. \u0410 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0432\u0441\u0435\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 &#8212; \u044d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0430\u0440\u0445\u0438\u0432\u0430 \u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430. \u0410 \u0435\u0441\u043b\u0438 \u0440\u0430\u0441\u0447\u0435\u0442 \u0435\u0449\u0435 \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0441\u044f \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430, \u0442\u043e \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043d\u0435\u0447\u0435\u0433\u043e. \u041f\u043e\u043c\u0438\u043c\u043e \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0430\u0440\u0445\u0438\u0432\u0430, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e 30 \u043c\u0438\u043d\u0443\u0442 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043a\u0440\u0443\u0442\u044f\u0449\u0435\u0435\u0441\u044f \u043a\u043e\u043b\u0435\u0441\u0438\u043a\u043e.\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0442\u0430\u0442\u0443\u0441\u044b \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043e\u043f\u043e\u0432\u0435\u0449\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0448\u0430\u0433\u0430\u0445.from enum import Enumclass GeneratedZipSteps(Enum):calculation_alive = &#171;\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438 \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 zip \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e.&#187;start_creating_zip = &#171;\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0437\u0430\u043f\u0443\u0441\u043a \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f zip.&#187;download_register_from_db = &#171;\u0420\u0435\u0433\u0438\u0441\u0442\u0440 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0411\u0414.&#187;save_register_on_disk = &#171;\u0420\u0435\u0433\u0438\u0441\u0442\u0440 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0438\u0441\u043a.&#187;create_zip = &#171;\u0421\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0430\u0440\u0445\u0438\u0432 \u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c\u0438.&#187;unable_to_generate_file = &#171;\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c zip \u0438\u0437-\u0437\u0430 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0438 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430.&#187;pipeline_has_not_been_run_yet = &#171;\u041f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0435\u0449\u0435 \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u0431\u044b\u043b \u0437\u0430\u043f\u0443\u0449\u0435\u043d.&#187;pipeline_has_been_run_while_zip_generating = &#171;\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f zip \u0431\u044b\u043b \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0440\u0430\u0441\u0447\u0435\u0442\u0430&#187;\u0423 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0431\u044b\u043b\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0445\u0440\u0430\u043d\u0438\u043b\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u044b \u0440\u0430\u0441\u0447\u0435\u0442\u0430. \u0410 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b \u0445\u0440\u0430\u043d\u0438\u043b\u0430 \u0441\u0442\u0430\u0442\u0443\u0441&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-493987","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/493987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=493987"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/493987\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=493987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=493987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=493987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}