From e12c23f0adc53fc3a7ae8774006c93a789fd9f95 Mon Sep 17 00:00:00 2001 From: Yax <1949284+kianby@users.noreply.github.com> Date: Tue, 10 Jul 2018 18:55:40 +0200 Subject: [PATCH] system exit on comment approval --- app/core/processor.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/core/processor.py b/app/core/processor.py index 4089255..7e4e31a 100644 --- a/app/core/processor.py +++ b/app/core/processor.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +import sys import os import logging import re @@ -209,6 +210,8 @@ def reply_comment_email(data): notify_subscribed_readers( comment.site.token, comment.site.url, comment.url) + # system quit + system_quit() def late_reject_comment(id): @@ -460,6 +463,10 @@ def get_processor(): return proc +def system_quit(): + sys.exit(0) + + def start(template_dir): global proc, env