{"id":445697,"date":"2025-01-22T09:06:52","date_gmt":"2025-01-22T09:06:52","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=445697"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=445697","title":{"rendered":"<span>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c SMS-\u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0435 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u044f\u0445 \u0441 GeoJSON \u0438 SMS API<\/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>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0421\u043b\u044b\u0448\u0430\u043b\u0438 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043c\u0438\u0440\u0443? \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0441\u0435\u0439\u0441\u043c\u043e\u043b\u043e\u0433 \u0438\u043b\u0438 \u043d\u0435 \u0436\u0438\u0432\u0451\u0442\u0435 \u0440\u044f\u0434\u043e\u043c \u0441 \u0442\u0435\u043a\u0442\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0440\u0430\u0437\u043b\u043e\u043c\u043e\u043c, \u0442\u043e \u0432\u0430\u043c \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e. \u041d\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0434\u0435\u0439 \u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0430\u0445 \u0432 \u0438\u0445 \u0440\u0435\u0433\u0438\u043e\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e, \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 SMS.\u00a0<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0446\u0435\u043d\u0442\u0440 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439. \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0432\u043e\u0437\u044c\u043c\u0435\u043c GeoJSON Earthquake API \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u044f\u0445, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c <a href=\"https:\/\/exolve.ru\/products\/sms-api\/?utm_source=habr&amp;utm_medium=refferal&amp;utm_campaign=sms_api_article&amp;utm_content=article_earthquake&amp;utm_term=sms_api_exolve\"><u>Exolve API<\/u><\/a>, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u0441\u044b\u043b\u0430\u0442\u044c SMS, \u0430 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c PostgreSQL.<\/p>\n<h4>\u0427\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c<\/h4>\n<ul>\n<li>\n<p><strong>GeoJSON Earthquake API<\/strong> \u2014 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u044f\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 GeoJSON. \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b, \u043c\u0430\u0433\u043d\u0438\u0442\u0443\u0434\u0443, \u0432\u0440\u0435\u043c\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>Exolve SMS API<\/strong> \u2014 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c SMS \u0441 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>PostgreSQL<\/strong> \u2014 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u0439 \u0438 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>RabbitMQ<\/strong> \u2014 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 SMS.<\/p>\n<\/li>\n<li>\n<p><strong>Python<\/strong> \u2014 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432 \u0435\u0434\u0438\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041a\u0430\u043a \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c<\/h4>\n<ol>\n<li>\n<p><strong>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>: \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u044f\u0445 \u0447\u0435\u0440\u0435\u0437 GeoJSON API \u043a\u0430\u0436\u0434\u044b\u0435 10 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<\/li>\n<li>\n<p><strong>\u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f<\/strong>: \u0433\u0435\u043e\u0444\u0438\u043b\u044c\u0442\u0440\u044b \u043e\u0442\u0431\u0438\u0440\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u0440\u0435\u0433\u0438\u043e\u043d\u0443 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0420\u043e\u0441\u0441\u0438\u0438).<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/strong>: \u043d\u043e\u0432\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 RabbitMQ.<\/p>\n<\/li>\n<li>\n<p><strong>\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 SMS<\/strong>: RabbitMQ \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044f SMS \u0447\u0435\u0440\u0435\u0437 Exolve API.<\/p>\n<\/li>\n<li>\n<p><strong>\u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0438<\/strong>: PostgreSQL \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438.<\/p>\n<\/li>\n<\/ol>\n<h4>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u044f\u0445 \u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f\u0445.<\/p>\n<pre><code class=\"python\">CREATE TABLE earthquakes (     id SERIAL PRIMARY KEY,     quake_id TEXT UNIQUE NOT NULL,     magnitude REAL NOT NULL,     place TEXT,     time TIMESTAMP NOT NULL,     longitude REAL NOT NULL,     latitude REAL NOT NULL );  CREATE TABLE notifications (     id SERIAL PRIMARY KEY,     earthquake_id INTEGER REFERENCES earthquakes(id),     phone_number TEXT NOT NULL,     sent_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );<\/code><\/pre>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 earthquakes \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u044f\u0445. \u041f\u043e\u043b\u0435 quake_id \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0434\u043d\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u0434\u0432\u0430\u0436\u0434\u044b.<\/p>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 notifications \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 SMS, \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u044f \u0435\u0433\u043e \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u0435\u043c.<\/p>\n<h4>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c RabbitMQ<\/h4>\n<p>RabbitMQ \u2014 \u044d\u0442\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c RabbitMQ:<\/p>\n<pre><code class=\"python\">sudo apt install rabbitmq-server sudo systemctl start rabbitmq-server sudo systemctl enable rabbitmq-server<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043b\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439. \u041e\u0447\u0435\u0440\u0435\u0434\u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0439, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0447\u0430\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 RabbitMQ:<\/p>\n<pre><code class=\"python\">import psycopg2 import pika  # \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a PostgreSQL def get_db_connection():     return psycopg2.connect(         dbname=\"earthquakes\",         user=\"your_user\",         password=\"your_password\",         host=\"localhost\"     )  # \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f RabbitMQ def init_rabbitmq():     connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))     channel = connection.channel()     channel.queue_declare(queue='notifications')     return channel<\/code><\/pre>\n<p>get_db_connection() \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a PostgreSQL, \u0430 init_rabbitmq() \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a RabbitMQ \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u044c notifications, \u0435\u0441\u043b\u0438 \u0435\u0451 \u0435\u0449\u0451 \u043d\u0435\u0442.<\/p>\n<h4>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 GeoJSON API \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/h4>\n<pre><code class=\"python\">import requests from datetime import datetime from shapely.geometry import Point, Polygon  GEOJSON_API_URL = \"https:\/\/earthquake.usgs.gov\/earthquakes\/feed\/v1.0\/summary\/all_day.geojson\"  # \u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0433\u0440\u0430\u043d\u0438\u0446 \u0440\u0435\u0433\u0438\u043e\u043d\u0430 (\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0420\u043e\u0441\u0441\u0438\u0438) RUSSIA_BOUNDS = Polygon([     (19.0, 41.0), (19.0, 82.0), (169.0, 82.0), (169.0, 41.0), (19.0, 41.0) ])  def is_in_region(longitude, latitude):     point = Point(longitude, latitude)     return RUSSIA_BOUNDS.contains(point)  def fetch_earthquake_data():     response = requests.get(GEOJSON_API_URL)     if response.status_code != 200:         print(f\"\u041e\u0448\u0438\u0431\u043a\u0430 API: {response.status_code}\")         return []      data = response.json()     earthquakes = []     for feature in data[\"features\"]:         props = feature[\"properties\"]         coords = feature[\"geometry\"][\"coordinates\"]          if props[\"mag\"] &gt;= 4.5 and is_in_region(coords[0], coords[1]):             earthquakes.append({                 \"id\": feature[\"id\"],                 \"magnitude\": props[\"mag\"],                 \"place\": props[\"place\"],                 \"time\": datetime.fromtimestamp(props[\"time\"] \/ 1000),                 \"longitude\": coords[0],                 \"latitude\": coords[1]             })      return earthquakes<\/code><\/pre>\n<p>fetch_earthquake_data() \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 GeoJSON API \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0430\u0448\u0438\u043c \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c. is_in_region() \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043b\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u0420\u043e\u0441\u0441\u0438\u0438.<\/p>\n<h4>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0432 RabbitMQ<\/h4>\n<pre><code class=\"python\">def save_earthquake(conn, quake):     with conn.cursor() as cursor:         cursor.execute(\"\"\"             INSERT INTO earthquakes (quake_id, magnitude, place, time, longitude, latitude)             VALUES (%s, %s, %s, %s, %s, %s)             ON CONFLICT (quake_id) DO NOTHING         \"\"\", (quake['id'], quake['magnitude'], quake['place'], quake['time'], quake['longitude'], quake['latitude']))     conn.commit()  def send_to_queue(channel, earthquake):     message = {         \"place\": earthquake[\"place\"],         \"magnitude\": earthquake[\"magnitude\"],         \"time\": earthquake[\"time\"].strftime(\"%Y-%m-%d %H:%M:%S\")     }     channel.basic_publish(exchange='', routing_key='notifications', body=json.dumps(message))     print(f\"\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c: {message}\")<\/code><\/pre>\n<p>save_earthquake() \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 send_to_queue() \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u0438 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c RabbitMQ \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<h4>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439<\/h4>\n<pre><code class=\"python\">import requests import json  EXOLVE_API_URL = \"https:\/\/api.exolve.ru\/messaging\/v1\/SendSMS\" EXOLVE_API_KEY = \"Bearer your_api_key_here\"  def process_notifications(ch, method, properties, body):     data = json.loads(body)     message = (         f\"\u26a0 \u0417\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u0435!\\n\"         f\"\u041c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435: {data['place']}\\n\"         f\"\u041c\u0430\u0433\u043d\u0438\u0442\u0443\u0434\u0430: {data['magnitude']}\\n\"         f\"\u0412\u0440\u0435\u043c\u044f: {data['time']}\\n\"         f\"\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f: \u041e\u0441\u0442\u0430\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.\"     )      payload = {         \"number\": \"AlfaName\",         \"destination\": \"79991112233\",         \"text\": message     }     headers = {         \"Authorization\": EXOLVE_API_KEY,         \"Content-Type\": \"application\/json\"     }      response = requests.post(EXOLVE_API_URL, json=payload, headers=headers)     if response.status_code == 200:         print(\"SMS \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e\")     else:         print(f\"\u041e\u0448\u0438\u0431\u043a\u0430 SMS: {response.status_code}\")<\/code><\/pre>\n<p>process_notifications() \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 SMS \u0447\u0435\u0440\u0435\u0437 Exolve API.<\/p>\n<p><strong>\u0412\u0438\u0434\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435<\/strong>: \u00ab\u26a0 \u0417\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u0435! \u041c\u0430\u0433\u043d\u0438\u0442\u0443\u0434\u0430 5.4. \u041e\u0441\u0442\u0430\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438!\u00bb<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f<\/strong>: \u00ab\u0421\u043b\u0435\u0434\u0443\u0439\u0442\u0435 \u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439 \u0437\u043e\u043d\u0435. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0442\u0438\u0435 \u0433\u0430\u0437\u0430 \u0438 \u0432\u043e\u0434\u044b.\u00bb<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u0430\u0442\u0443\u0441<\/strong>: \u00ab\u0412\u0441\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u0423\u0433\u0440\u043e\u0437\u044b \u043d\u0435\u0442.\u00bb<\/p>\n<\/li>\n<\/ul>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f:<\/p>\n<ol>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u044f\u0445.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e RabbitMQ \u0438 <a href=\"https:\/\/exolve.ru\/products\/sms-api\/?utm_source=habr&amp;utm_medium=refferal&amp;utm_campaign=sms_api_article&amp;utm_content=article_earthquake&amp;utm_term=sms_api_exolve\"><u>Exolve API<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0425\u0440\u0430\u043d\u0438\u0442 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 PostgreSQL.<\/p>\n<\/li>\n<\/ol>\n<p><em>\u0417\u043d\u0430\u0439\u0442\u0435, \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u043e\u0441\u0438\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440 \u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u0430 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u043d\u043d\u0435\u0433\u043e \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u043c\u0438, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0441\u043b\u0443\u0436\u0431\u0430\u043c \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c.<\/em><\/p>\n<hr\/>\n<p><strong>\u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043d\u0430\u0448 \u0425\u0430\u0431, \u0441\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u043d\u043e\u0432\u044b\u043c\u0438 \u0433\u0430\u0439\u0434\u0430\u043c\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u0437<\/strong><\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a \u043c\u044b \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u0441\u0440\u0435\u0434\u0438 \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432 \u043d\u0430\u0448\u0435\u0433\u043e<a href=\"https:\/\/habr.com\/ru\/companies\/exolve\/profile\/\"><u> \u0425\u0430\u0431\u0440-\u043a\u0430\u043d\u0430\u043b\u0430<\/u><\/a> \u0438 \u0434\u0430\u0440\u0438\u043c \u043a\u0440\u0443\u0442\u044b\u0435 \u043f\u0440\u0438\u0437\u044b \u043e\u0442 \u041c\u0422\u0421 Exolve: \u0441\u0442\u0438\u043b\u044c\u043d\u044b\u0435 \u0440\u044e\u043a\u0437\u0430\u043a\u0438, \u043b\u043e\u043d\u0433\u0441\u043b\u0438\u0432\u044b \u0438 \u043c\u043e\u0449\u043d\u044b\u0435 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0435 \u0437\u0430\u0440\u044f\u0434\u043a\u0438.<a href=\"https:\/\/community.exolve.ru\/forum\/forum1\/606-uchastvuyte-v-nashem-rozygryshe-na-khabre\/?utm_source=habr&amp;utm_medium=refferal&amp;utm_campaign=sms_api_article&amp;utm_content=article_earthquake&amp;utm_term=konkurs_exolve\"><u> \u041f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u0448\u043b\u044b\u0445 \u0440\u043e\u0437\u044b\u0433\u0440\u044b\u0448\u0435\u0439 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430<\/u><\/a>.<\/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\/875216\/\"> https:\/\/habr.com\/ru\/articles\/875216\/<\/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>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0421\u043b\u044b\u0448\u0430\u043b\u0438 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043c\u0438\u0440\u0443? \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0441\u0435\u0439\u0441\u043c\u043e\u043b\u043e\u0433 \u0438\u043b\u0438 \u043d\u0435 \u0436\u0438\u0432\u0451\u0442\u0435 \u0440\u044f\u0434\u043e\u043c \u0441 \u0442\u0435\u043a\u0442\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0440\u0430\u0437\u043b\u043e\u043c\u043e\u043c, \u0442\u043e \u0432\u0430\u043c \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e. \u041d\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0434\u0435\u0439 \u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0430\u0442\u0430\u0441\u0442\u0440\u043e\u0444\u0430\u0445 \u0432 \u0438\u0445 \u0440\u0435\u0433\u0438\u043e\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e, \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 SMS.\u00a0<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0446\u0435\u043d\u0442\u0440 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439. \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0432\u043e\u0437\u044c\u043c\u0435\u043c GeoJSON Earthquake API \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u044f\u0445, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c <a href=\"https:\/\/exolve.ru\/products\/sms-api\/?utm_source=habr&amp;utm_medium=refferal&amp;utm_campaign=sms_api_article&amp;utm_content=article_earthquake&amp;utm_term=sms_api_exolve\"><u>Exolve API<\/u><\/a>, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u0441\u044b\u043b\u0430\u0442\u044c SMS, \u0430 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c PostgreSQL.<\/p>\n<h4>\u0427\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c<\/h4>\n<ul>\n<li>\n<p><strong>GeoJSON Earthquake API<\/strong> \u2014 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u044f\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 GeoJSON. \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b, \u043c\u0430\u0433\u043d\u0438\u0442\u0443\u0434\u0443, \u0432\u0440\u0435\u043c\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>Exolve SMS API<\/strong> \u2014 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c SMS \u0441 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>PostgreSQL<\/strong> \u2014 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u0439 \u0438 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>RabbitMQ<\/strong> \u2014 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 SMS.<\/p>\n<\/li>\n<li>\n<p><strong>Python<\/strong> \u2014 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432 \u0435\u0434\u0438\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041a\u0430\u043a \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c<\/h4>\n<ol>\n<li>\n<p><strong>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>: \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u044f\u0445 \u0447\u0435\u0440\u0435\u0437 GeoJSON API \u043a\u0430\u0436\u0434\u044b\u0435 10 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<\/li>\n<li>\n<p><strong>\u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f<\/strong>: \u0433\u0435\u043e\u0444\u0438\u043b\u044c\u0442\u0440\u044b \u043e\u0442\u0431\u0438\u0440\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u0440\u0435\u0433\u0438\u043e\u043d\u0443 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0420\u043e\u0441\u0441\u0438\u0438).<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/strong>: \u043d\u043e\u0432\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 RabbitMQ.<\/p>\n<\/li>\n<li>\n<p><strong>\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 SMS<\/strong>: RabbitMQ \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044f SMS \u0447\u0435\u0440\u0435\u0437 Exolve API.<\/p>\n<\/li>\n<li>\n<p><strong>\u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0438<\/strong>: PostgreSQL \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438.<\/p>\n<\/li>\n<\/ol>\n<h4>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u044f\u0445 \u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f\u0445.<\/p>\n<pre><code class=\"python\">CREATE TABLE earthquakes (     id SERIAL PRIMARY KEY,     quake_id TEXT UNIQUE NOT NULL,     magnitude REAL NOT NULL,     place TEXT,     time TIMESTAMP NOT NULL,     longitude REAL NOT NULL,     latitude REAL NOT NULL );  CREATE TABLE notifications (     id SERIAL PRIMARY KEY,     earthquake_id INTEGER REFERENCES earthquakes(id),     phone_number TEXT NOT NULL,     sent_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP );<\/code><\/pre>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 earthquakes \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u044f\u0445. \u041f\u043e\u043b\u0435 quake_id \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0434\u043d\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043d\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u0434\u0432\u0430\u0436\u0434\u044b.<\/p>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 notifications \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 SMS, \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u044f \u0435\u0433\u043e \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u0435\u043c.<\/p>\n<h4>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c RabbitMQ<\/h4>\n<p>RabbitMQ \u2014 \u044d\u0442\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c RabbitMQ:<\/p>\n<pre><code class=\"python\">sudo apt install rabbitmq-server sudo systemctl start rabbitmq-server sudo systemctl enable rabbitmq-server<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043b\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439. \u041e\u0447\u0435\u0440\u0435\u0434\u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0439, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0447\u0430\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 RabbitMQ:<\/p>\n<pre><code class=\"python\">import psycopg2 import pika  # \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a PostgreSQL def get_db_connection():     return psycopg2.connect(         dbname=\"earthquakes\",         user=\"your_user\",         password=\"your_password\",         host=\"localhost\"     )  # \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f RabbitMQ def init_rabbitmq():     connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))     channel = connection.channel()     channel.queue_declare(queue='notifications')     return channel<\/code><\/pre>\n<p>get_db_connection() \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a PostgreSQL, \u0430 init_rabbitmq() \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a RabbitMQ \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u044c notifications, \u0435\u0441\u043b\u0438 \u0435\u0451 \u0435\u0449\u0451 \u043d\u0435\u0442.<\/p>\n<h4>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 GeoJSON API \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/h4>\n<pre><code class=\"python\">import requests from datetime import datetime from shapely.geometry import Point, Polygon  GEOJSON_API_URL = \"https:\/\/earthquake.usgs.gov\/earthquakes\/feed\/v1.0\/summary\/all_day.geojson\"  # \u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0433\u0440\u0430\u043d\u0438\u0446 \u0440\u0435\u0433\u0438\u043e\u043d\u0430 (\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0420\u043e\u0441\u0441\u0438\u0438) RUSSIA_BOUNDS = Polygon([     (19.0, 41.0), (19.0, 82.0), (169.0, 82.0), (169.0, 41.0), (19.0, 41.0) ])  def is_in_region(longitude, latitude):     point = Point(longitude, latitude)     return RUSSIA_BOUNDS.contains(point)  def fetch_earthquake_data():     response = requests.get(GEOJSON_API_URL)     if response.status_code != 200:         print(f\"\u041e\u0448\u0438\u0431\u043a\u0430 API: {response.status_code}\")         return []      data = response.json()     earthquakes = []     for feature in data[\"features\"]:         props = feature[\"properties\"]         coords = feature[\"geometry\"][\"coordinates\"]          if props[\"mag\"] &gt;= 4.5 and is_in_region(coords[0], coords[1]):             earthquakes.append({                 \"id\": feature[\"id\"],                 \"magnitude\": props[\"mag\"],                 \"place\": props[\"place\"],                 \"time\": datetime.fromtimestamp(props[\"time\"] \/ 1000),                 \"longitude\": coords[0],                 \"latitude\": coords[1]             })      return earthquakes<\/code><\/pre>\n<p>fetch_earthquake_data() \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 GeoJSON API \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0430\u0448\u0438\u043c \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c. is_in_region() \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043b\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u0420\u043e\u0441\u0441\u0438\u0438.<\/p>\n<h4>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0432 RabbitMQ<\/h4>\n<pre><code class=\"python\">def save_earthquake(conn, quake):     with conn.cursor() as cursor:         cursor.execute(\"\"\"             INSERT INTO earthquakes (quake_id, magnitude, place, time, longitude, latitude)             VALUES (%s, %s, %s, %s, %s, %s)             ON CONFLICT (quake_id) DO NOTHING         \"\"\", (quake['id'], quake['magnitude'], quake['place'], quake['time'], quake['longitude'], quake['latitude']))     conn.commit()  def send_to_queue(channel, earthquake):     message = {         \"place\": earthquake[\"place\"],         \"magnitude\": earthquake[\"magnitude\"],         \"time\": earthquake[\"time\"].strftime(\"%Y-%m-%d %H:%M:%S\")     }     channel.basic_publish(exchange='', routing_key='notifications', body=json.dumps(message))     print(f\"\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c: {message}\")<\/code><\/pre>\n<p>save_earthquake() \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 send_to_queue() \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u0438 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c RabbitMQ \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<h4>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439<\/h4>\n<pre><code class=\"python\">import requests import json  EXOLVE_API_URL = \"https:\/\/api.exolve.ru\/messaging\/v1\/SendSMS\" EXOLVE_API_KEY = \"Bearer your_api_key_here\"  def process_notifications(ch, method, properties, body):     data = json.loads(body)     message = (         f\"\u26a0 \u0417\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u0435!\\n\"         f\"\u041c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435: {data['place']}\\n\"         f\"\u041c\u0430\u0433\u043d\u0438\u0442\u0443\u0434\u0430: {data['magnitude']}\\n\"         f\"\u0412\u0440\u0435\u043c\u044f: {data['time']}\\n\"         f\"\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f: \u041e\u0441\u0442\u0430\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.\"     )      payload = {         \"number\": \"AlfaName\",         \"destination\": \"79991112233\",         \"text\": message     }     headers = {         \"Authorization\": EXOLVE_API_KEY,         \"Content-Type\": \"application\/json\"     }      response = requests.post(EXOLVE_API_URL, json=payload, headers=headers)     if response.status_code == 200:         print(\"SMS \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e\")     else:         print(f\"\u041e\u0448\u0438\u0431\u043a\u0430 SMS: {response.status_code}\")<\/code><\/pre>\n<p>process_notifications() \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 SMS \u0447\u0435\u0440\u0435\u0437 Exolve API.<\/p>\n<p><strong>\u0412\u0438\u0434\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435<\/strong>: \u00ab\u26a0 \u0417\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u0435! \u041c\u0430\u0433\u043d\u0438\u0442\u0443\u0434\u0430 5.4. \u041e\u0441\u0442\u0430\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u0432 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438!\u00bb<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f<\/strong>: \u00ab\u0421\u043b\u0435\u0434\u0443\u0439\u0442\u0435 \u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439 \u0437\u043e\u043d\u0435. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0442\u0438\u0435 \u0433\u0430\u0437\u0430 \u0438 \u0432\u043e\u0434\u044b.\u00bb<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u0430\u0442\u0443\u0441<\/strong>: \u00ab\u0412\u0441\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u0423\u0433\u0440\u043e\u0437\u044b \u043d\u0435\u0442.\u00bb<\/p>\n<\/li>\n<\/ul>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f:<\/p>\n<ol>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0437\u0435\u043c\u043b\u0435\u0442\u0440\u044f\u0441\u0435\u043d\u0438\u044f\u0445.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e RabbitMQ \u0438 <a href=\"https:\/\/exolve.ru\/products\/sms-api\/?utm_source=habr&amp;utm_medium=refferal&amp;utm_campaign=sms_api_article&amp;utm_content=article_earthquake&amp;utm_term=sms_api_exolve\"><u>Exolve API<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0425\u0440\u0430\u043d\u0438\u0442 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 PostgreSQL.<\/p>\n<\/li>\n<\/ol>\n<p><em>\u0417\u043d\u0430\u0439\u0442\u0435, \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u043e\u0441\u0438\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440 \u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u0430 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u043d\u043d\u0435\u0433\u043e \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0447\u0440\u0435\u0437\u0432\u044b\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u043c\u0438, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0441\u043b\u0443\u0436\u0431\u0430\u043c \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u044f\u043c.<\/em><\/p>\n<hr\/>\n<p><strong>\u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043d\u0430\u0448 \u0425\u0430\u0431, \u0441\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u043d\u043e\u0432\u044b\u043c\u0438 \u0433\u0430\u0439\u0434\u0430\u043c\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u0437<\/strong><\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a \u043c\u044b \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u0441\u0440\u0435\u0434\u0438 \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u043e\u0432 \u043d\u0430\u0448\u0435\u0433\u043e<a href=\"https:\/\/habr.com\/ru\/companies\/exolve\/profile\/\"><u> \u0425\u0430\u0431\u0440-\u043a\u0430\u043d\u0430\u043b\u0430<\/u><\/a> \u0438 \u0434\u0430\u0440\u0438\u043c \u043a\u0440\u0443\u0442\u044b\u0435 \u043f\u0440\u0438\u0437\u044b \u043e\u0442 \u041c\u0422\u0421 Exolve: \u0441\u0442\u0438\u043b\u044c\u043d\u044b\u0435 \u0440\u044e\u043a\u0437\u0430\u043a\u0438, \u043b\u043e\u043d\u0433\u0441\u043b\u0438\u0432\u044b \u0438 \u043c\u043e\u0449\u043d\u044b\u0435 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0435 \u0437\u0430\u0440\u044f\u0434\u043a\u0438.<a href=\"https:\/\/community.exolve.ru\/forum\/forum1\/606-uchastvuyte-v-nashem-rozygryshe-na-khabre\/?utm_source=habr&amp;utm_medium=refferal&amp;utm_campaign=sms_api_article&amp;utm_content=article_earthquake&amp;utm_term=konkurs_exolve\"><u> \u041f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u0448\u043b\u044b\u0445 \u0440\u043e\u0437\u044b\u0433\u0440\u044b\u0448\u0435\u0439 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430<\/u><\/a>.<\/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\/875216\/\"> https:\/\/habr.com\/ru\/articles\/875216\/<\/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-445697","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/445697","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=445697"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/445697\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=445697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=445697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=445697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}