{"id":349042,"date":"2023-06-19T21:00:48","date_gmt":"2023-06-19T21:00:48","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=349042"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=349042","title":{"rendered":"<span>\u0410 \u043a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u044c? \u0414\u0435\u043b\u0430\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u0434\u043b\u044f \u0431\u043e\u0442\u0430 \u0441 \u043d\u0443\u043b\u044f. \u0427\u0430\u0441\u0442\u044c 2 \u2014 \u0434\u0435\u043b\u0430\u0435\u043c \u0434\u0430\u0448\u0431\u043e\u0440\u0434 \u0432 Redash<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/742576\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 <\/a>\u043c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u043d\u0430\u0448\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u2014 \u0431\u043e\u0442\u0430 \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u044b\u043c\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 Telegram.<\/p>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Redash.<\/p>\n<h2>\u0427\u0442\u043e \u043b\u0435\u0436\u0438\u0442 \u0432 \u0431\u0430\u0437\u0435<\/h2>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u0430\u0437\u0435 (MongoDB) \u0443 \u043d\u0430\u0441 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c:<\/p>\n<pre><code class=\"json\">{   \"_id\": {     \"$oid\": \"64908ebc5a1d121b983e2406\"   },   \"user_id\": 5784928745,   \"username\": \"nickname\",   \"datetime\": 1687195324.282187,   \"status\": \"active\" }<\/code><\/pre>\n<p>\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"json\">{   \"_id\": {     \"$oid\": \"64908ec65a1d121b983e2407\"   },   \"user_id_from\": 5784928745,   \"user_id_to\": \"5982379843\",   \"username_from\": \"nickname_from\",   \"username_to\": \"nickname_to\",   \"content\": \"Hi\",   \"message_type\": \"question\",   \"datetime\": 1687195334.6866229 }<\/code><\/pre>\n<h2>\u041f\u0438\u0448\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/h2>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441\u044b \u043a MongoDB \u2014 \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0430, \u044f \u0441\u0447\u0438\u0442\u0430\u044e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0438\u043c \u0445\u043e\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0432\u043b\u0430\u0434\u0435\u0442\u044c.<\/p>\n<h3>\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438<\/h3>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439:<\/p>\n<pre><code class=\"json\">{ \"collection\": \"users\", \"query\": { \"status\": \"active\" }, \"count\": true }<\/code><\/pre>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0438\u0434\u0436\u0435\u0442 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 (Counter):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/73d\/8e4\/95f\/73d8e495f96ad8f430df768c3b2d3114.png\" width=\"2794\" height=\"1388\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/73d\/8e4\/95f\/73d8e495f96ad8f430df768c3b2d3114.png\"\/><\/figure>\n<h3>\u0423\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438<\/h3>\n<p>\u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u043c\u044b \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043c\u0435\u0447\u0430\u043b\u0438 \u0438\u0445 \u0442\u0430\u043a\u043e\u0432\u044b\u043c\u0438? \u0412\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u0436\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441:<\/p>\n<pre><code class=\"json\">{ \"collection\": \"users\", \"query\": { \"status\": \"deleted\" }, \"count\": true }<\/code><\/pre>\n<p>\u0412\u0438\u0434\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435.<\/p>\n<h4>\u0412\u0441\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438<\/h4>\n<p>\u041d\u0430\u043c \u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u0441\u0443\u043c\u043c\u0443 \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0431\u043e\u0442\u0430? \u0414\u0443\u043c\u0430\u044e, \u0434\u0430. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e:<\/p>\n<pre><code class=\"json\">{ \"collection\": \"users\", \"count\": true }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0435\u0449\u0451 \u043f\u0440\u043e\u0449\u0435, \u0445\u0435\u0445.<\/p>\n<h3>\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f<\/h3>\n<p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u0445 \u043c\u044b \u0443\u0436\u0435 \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"json\">{ \"collection\": \"messages\", \"count\": true }<\/code><\/pre>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u0442\u044c \u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0435, \u0440\u0430\u0437 \u0443\u0436 \u043c\u044b \u0438\u0445 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c (\u0430 &#8212; \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0441\u0442\u044c):<\/p>\n<pre><code class=\"json\">{     \"collection\": \"messages\",     \"aggregate\": [         {             \"$addFields\": {                 \"datetime\": {                     \"$toDate\": {                         \"$multiply\": [                             \"$datetime\",                             1000                         ]                     }                 }             }         }     ] }<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p><code>$toDate<\/code> \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0432 \u0434\u0430\u0442\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0432 \u0432\u0438\u0434\u0435 Unix Timestamp \u0432 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0414\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>$multiply<\/code> \u2014 \u0443\u043c\u043d\u043e\u0436\u0430\u0435\u043c \u043d\u0430 1000. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 <code>$toDate<\/code> \u0432\u0435\u0440\u043d\u0451\u0442 \u043d\u0430\u043c \u0434\u0430\u0442\u0443. \u0421\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0435\u0451 \u0432 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 <code>datetime<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c (\u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c). \u0412\u0441\u0451 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c <code>$addFields<\/code> (\u0442\u043e \u0436\u0435, \u0447\u0442\u043e \u0438 <code>$project<\/code>, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u0441\u0442\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b). \u041e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0432 <code>aggregate<\/code> \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u0438\u0434\u0436\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0438, \u0433\u0434\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u044b, \u043b\u0438\u0431\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u043c\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f6c\/b9f\/b3f\/f6cb9fb3f60733b97929722d0f56bebb.png\" width=\"1592\" height=\"358\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f6c\/b9f\/b3f\/f6cb9fb3f60733b97929722d0f56bebb.png\"\/><\/figure>\n<p>\u0415\u0449\u0451 \u0431\u044b \u043d\u0430\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043d\u043e, \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0434\u043d\u044f\u043c. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e:<\/p>\n<pre><code class=\"json\">{     \"collection\": \"messages\",     \"aggregate\": [         {             \"$addFields\": {                 \"datetime\": {                     \"$toDate\": {                         \"$multiply\": [                             \"$datetime\",                             1000                         ]                     }                 }             }         },         {             \"$group\": {                 \"_id\": {                     \"$dateToString\": {                         \"format\": \"%Y-%m-%d\",                         \"date\": \"$datetime\"                     }                 },                 \"count\": {                     \"$sum\": 1                 }             }         }     ] }<\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0443 \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0443 <code>datetime<\/code> \u0432 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 <code>_id<\/code>, \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f <code>count<\/code>.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0433\u0440\u0430\u0444\u0438\u043a, \u0433\u0434\u0435 <code>_id<\/code> \u2014 \u044d\u0442\u043e \u043e\u0441\u044c \u0425, \u0430 <code>count<\/code> \u2014 Y:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/318\/6cf\/7f4\/3186cf7f475c6b2b9dcbaa38dfe8fd5b.png\" width=\"2130\" height=\"954\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/318\/6cf\/7f4\/3186cf7f475c6b2b9dcbaa38dfe8fd5b.png\"\/><\/figure>\n<h3>\u0413\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/h3>\n<p>\u0424\u0443\u0445, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u2014 \u044d\u0442\u043e \u0433\u0440\u0430\u0444\u0438\u043a \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u043e \u0434\u043d\u044f\u043c. \u041c\u0435\u043d\u044f\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0443 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"json\">{     \"collection\": \"users\",     \"aggregate\": [         {             \"$addFields\": {                 \"datetime\": {                     \"$toDate\": {                         \"$multiply\": [                             \"$datetime\",                             1000                         ]                     }                 }             }         },         {             \"$group\": {                 \"_id\": {                     \"$dateToString\": {                         \"format\": \"%Y-%m-%d\",                         \"date\": \"$datetime\"                     }                 },                 \"count\": {                     \"$sum\": 1                 }             }         }     ] }<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/459\/b6d\/644\/459b6d6444067b39aebb70e7830d49e1.png\" width=\"1588\" height=\"878\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/459\/b6d\/644\/459b6d6444067b39aebb70e7830d49e1.png\"\/><\/figure>\n<p>\u0421 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435 \u2014 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u0430\u0448\u0431\u043e\u0440\u0434.<\/p>\n<h2>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u0430\u0448\u0431\u043e\u0440\u0434<\/h2>\n<p>\u0412\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438 \u0434\u0430\u0442\u044c \u0438\u043c \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0438\u043c \u0434\u0430\u0432\u0430\u043b\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432, \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u044b\u0439 \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u043f\u043e\u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/27a\/6f4\/484\/27a6f4484620119d7f15b43e78bdcbf2.png\" width=\"2872\" height=\"1398\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/27a\/6f4\/484\/27a6f4484620119d7f15b43e78bdcbf2.png\"\/><\/figure>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u0441\u0451 \ud83d\ude42<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \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\/742716\/\"> https:\/\/habr.com\/ru\/articles\/742716\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/articles\/742576\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 <\/a>\u043c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u043d\u0430\u0448\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u2014 \u0431\u043e\u0442\u0430 \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u044b\u043c\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 Telegram.<\/p>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Redash.<\/p>\n<h2>\u0427\u0442\u043e \u043b\u0435\u0436\u0438\u0442 \u0432 \u0431\u0430\u0437\u0435<\/h2>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u0430\u0437\u0435 (MongoDB) \u0443 \u043d\u0430\u0441 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c:<\/p>\n<pre><code class=\"json\">{   \"_id\": {     \"$oid\": \"64908ebc5a1d121b983e2406\"   },   \"user_id\": 5784928745,   \"username\": \"nickname\",   \"datetime\": 1687195324.282187,   \"status\": \"active\" }<\/code><\/pre>\n<p>\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"json\">{   \"_id\": {     \"$oid\": \"64908ec65a1d121b983e2407\"   },   \"user_id_from\": 5784928745,   \"user_id_to\": \"5982379843\",   \"username_from\": \"nickname_from\",   \"username_to\": \"nickname_to\",   \"content\": \"Hi\",   \"message_type\": \"question\",   \"datetime\": 1687195334.6866229 }<\/code><\/pre>\n<h2>\u041f\u0438\u0448\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/h2>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441\u044b \u043a MongoDB \u2014 \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0430, \u044f \u0441\u0447\u0438\u0442\u0430\u044e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0438\u043c \u0445\u043e\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0432\u043b\u0430\u0434\u0435\u0442\u044c.<\/p>\n<h3>\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438<\/h3>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439:<\/p>\n<pre><code class=\"json\">{ \"collection\": \"users\", \"query\": { \"status\": \"active\" }, \"count\": true }<\/code><\/pre>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0438\u0434\u0436\u0435\u0442 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 (Counter):<\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>\u0423\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438<\/h3>\n<p>\u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u043c\u044b \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043c\u0435\u0447\u0430\u043b\u0438 \u0438\u0445 \u0442\u0430\u043a\u043e\u0432\u044b\u043c\u0438? \u0412\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u0436\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441:<\/p>\n<pre><code class=\"json\">{ \"collection\": \"users\", \"query\": { \"status\": \"deleted\" }, \"count\": true }<\/code><\/pre>\n<p>\u0412\u0438\u0434\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435.<\/p>\n<h4>\u0412\u0441\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438<\/h4>\n<p>\u041d\u0430\u043c \u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u0441\u0443\u043c\u043c\u0443 \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0431\u043e\u0442\u0430? \u0414\u0443\u043c\u0430\u044e, \u0434\u0430. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e:<\/p>\n<pre><code class=\"json\">{ \"collection\": \"users\", \"count\": true }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0435\u0449\u0451 \u043f\u0440\u043e\u0449\u0435, \u0445\u0435\u0445.<\/p>\n<h3>\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f<\/h3>\n<p>\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u0445 \u043c\u044b \u0443\u0436\u0435 \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"json\">{ \"collection\": \"messages\", \"count\": true }<\/code><\/pre>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u0442\u044c \u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0435, \u0440\u0430\u0437 \u0443\u0436 \u043c\u044b \u0438\u0445 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c (\u0430 &#8212; \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0441\u0442\u044c):<\/p>\n<pre><code class=\"json\">{     \"collection\": \"messages\",     \"aggregate\": [         {             \"$addFields\": {                 \"datetime\": {                     \"$toDate\": {                         \"$multiply\": [                             \"$datetime\",                             1000                         ]                     }                 }             }         }     ] }<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p><code>$toDate<\/code> \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0432 \u0434\u0430\u0442\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0432 \u0432\u0438\u0434\u0435 Unix Timestamp \u0432 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0414\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>$multiply<\/code> \u2014 \u0443\u043c\u043d\u043e\u0436\u0430\u0435\u043c \u043d\u0430 1000. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 <code>$toDate<\/code> \u0432\u0435\u0440\u043d\u0451\u0442 \u043d\u0430\u043c \u0434\u0430\u0442\u0443. \u0421\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0435\u0451 \u0432 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 <code>datetime<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c (\u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c). \u0412\u0441\u0451 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c <code>$addFields<\/code> (\u0442\u043e \u0436\u0435, \u0447\u0442\u043e \u0438 <code>$project<\/code>, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u0441\u0442\u0438\u0440\u0430\u0435\u0442 \u0432\u0441\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b). \u041e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0432 <code>aggregate<\/code> \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u0438\u0434\u0436\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0438, \u0433\u0434\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u044b, \u043b\u0438\u0431\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u043c\u0438:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0415\u0449\u0451 \u0431\u044b \u043d\u0430\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043d\u043e, \u043a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0434\u043d\u044f\u043c. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e:<\/p>\n<pre><code class=\"json\">{     \"collection\": \"messages\",     \"aggregate\": [         {             \"$addFields\": {                 \"datetime\": {                     \"$toDate\": {                         \"$multiply\": [                             \"$datetime\",                             1000                         ]                     }                 }             }         },         {             \"$group\": {                 \"_id\": {                     \"$dateToString\": {                         \"format\": \"%Y-%m-%d\",                         \"date\": \"$datetime\"                     }                 },                 \"count\": {                     \"$sum\": 1                 }             }         }     ] }<\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0443 \u043f\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0443 <code>datetime<\/code> \u0432 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 <code>_id<\/code>, \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f <code>count<\/code>.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0433\u0440\u0430\u0444\u0438\u043a, \u0433\u0434\u0435 <code>_id<\/code> \u2014 \u044d\u0442\u043e \u043e\u0441\u044c \u0425, \u0430 <code>count<\/code> \u2014 Y:<\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>\u0413\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/h3>\n<p>\u0424\u0443\u0445, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u2014 \u044d\u0442\u043e \u0433\u0440\u0430\u0444\u0438\u043a \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u043e \u0434\u043d\u044f\u043c. \u041c\u0435\u043d\u044f\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0443 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"json\">{     \"collection\": \"users\",     \"aggregate\": [         {             \"$addFields\": {                 \"datetime\": {                     \"$toDate\": {                         \"$multiply\": [                             \"$datetime\",                             1000                         ]                     }                 }             }         },         {             \"$group\": {                 \"_id\": {                     \"$dateToString\": {                         \"format\": \"%Y-%m-%d\",                         \"date\": \"$datetime\"                     }                 },                 \"count\": {                     \"$sum\": 1                 }             }         }     ] }<\/code><\/pre>\n<figure class=\"full-width\"><\/figure>\n<p>\u0421 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435 \u2014 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u0430\u0448\u0431\u043e\u0440\u0434.<\/p>\n<h2>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u0430\u0448\u0431\u043e\u0440\u0434<\/h2>\n<p>\u0412\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438 \u0434\u0430\u0442\u044c \u0438\u043c \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f. \u0422\u0430\u043a\u0436\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0438\u043c \u0434\u0430\u0432\u0430\u043b\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432, \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u044b\u0439 \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u043f\u043e\u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u0441\u0451 \ud83d\ude42<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \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\/742716\/\"> https:\/\/habr.com\/ru\/articles\/742716\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-349042","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/349042","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=349042"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/349042\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=349042"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=349042"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=349042"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}