From c9a1f608ca0363cb8b226cc017128075e3fb5efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Mon, 22 Jun 2026 08:35:54 +0400 Subject: [PATCH] =?UTF-8?q?v1.0.104:=20reset=5Fcontract=20+=20=D0=B8=D0=B4?= =?UTF-8?q?=D0=B5=D0=BC=D0=BF=D0=BE=D1=82=D0=B5=D0=BD=D1=82=D0=BD=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D1=8C=20=E2=80=94=20=D0=BE=D1=87=D0=B8=D1=81=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B4=20=D1=81=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BD=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apply_events.cfm | 4 ++-- deploy/convert_server.py | 3 +++ reset_contract.cfm | 29 +++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 reset_contract.cfm diff --git a/apply_events.cfm b/apply_events.cfm index 5c3f181..23e4051 100644 --- a/apply_events.cfm +++ b/apply_events.cfm @@ -16,13 +16,13 @@ - + SELECT COUNT(*) as cnt FROM spec_events WHERE supplement_id = - + diff --git a/deploy/convert_server.py b/deploy/convert_server.py index 003aad7..e3fe182 100755 --- a/deploy/convert_server.py +++ b/deploy/convert_server.py @@ -107,6 +107,9 @@ class Handler(BaseHTTPRequestHandler): t0 = time.time() try: + # 0. Сброс предыдущих результатов сравнения + httpx.get(f"{LUCEE_URL}/reset_contract.cfm?contract_id={cid}", timeout=10) + # 1. Список supplements supps = self._lucee_query( f"SELECT s.id, s.type, d.filename FROM supplements s " diff --git a/reset_contract.cfm b/reset_contract.cfm new file mode 100644 index 0000000..cd09040 --- /dev/null +++ b/reset_contract.cfm @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + DELETE FROM spec_current + WHERE contract_id = + + + DELETE FROM spec_events + WHERE contract_id = + + + + + + + + + +#serializeJSON(result)#