ATLAS Offline Software
Functions | Variables
python.panic Namespace Reference

Functions

def panic (msg)
 

Variables

string DEST = '/queue/atlas.dqm.panic'
 

Function Documentation

◆ panic()

def python.panic.panic (   msg)

Definition at line 5 of file panic.py.

5 def panic(msg):
6  import stomp
7  import json
8  from . import stompconfig
9  import sys, os
10  import traceback
11  import time
12 
13  conn=stomp.Connection([('atlas-mb.cern.ch', 61013)])
14  print('panic: started connection')
15 
16  conn.connect(wait=True, **stompconfig.config())
17  print('panic: connected')
18 
19  header={'MsgClass':'DQ',
20  'MsgType': 'Panic',
21  'type':'textMessage',
22  'persistent': 'true',
23  'destination': DEST,
24  'ack': 'auto',
25  }
26  body=json.dumps({'msg': msg,
27  'command': sys.argv[0],
28  'arguments': sys.argv[1:],
29  'traceback': traceback.format_stack()[:-1],
30  'cwd': os.getcwd(),
31  'time': time.time(),
32  'usrtime': time.strftime('%Y-%m-%d %H:%H:%M %Z', time.localtime()),
33  })
34  conn.send(body=body, headers=header, destination=DEST, ack='auto')
35  print('panic: sent message')
36  print(header)
37  print(body)
38  conn.disconnect()
39 

Variable Documentation

◆ DEST

string python.panic.DEST = '/queue/atlas.dqm.panic'

Definition at line 3 of file panic.py.

python.panic.panic
def panic(msg)
Definition: panic.py:5
dbg::print
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
Definition: SGImplSvc.cxx:70