Three isolated services (alert scraper, apply HTTP worker, web UI+DB) with argon2 auth, signed cookies, CSRF, rate-limited login, kill switch, apply circuit breaker, audit log, and strict CSP. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
33 lines
767 B
Python
33 lines
767 B
Python
from language import _
|
|
import logging
|
|
|
|
logger = logging.getLogger("flat-apply")
|
|
|
|
class ApplicationResult:
|
|
def __init__(self, success: bool, message: str=""):
|
|
self.success = success
|
|
self.message = message
|
|
|
|
def __str__(self):
|
|
string = ""
|
|
if self.success:
|
|
string += _("application_success")
|
|
else:
|
|
string += _("application_failed")
|
|
|
|
if self.message:
|
|
string += "\n"
|
|
string += self.message
|
|
return string
|
|
|
|
def __repr__(self):
|
|
string = ""
|
|
if self.success:
|
|
string += "success"
|
|
else:
|
|
string += "failed"
|
|
|
|
if self.message:
|
|
string += ": "
|
|
string += self.message
|
|
return string
|