forked from NSLS2/lsdc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
daq_mainAux.py
executable file
·34 lines (31 loc) · 1.05 KB
/
daq_mainAux.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/opt/conda_envs/lsdc-server-2022-1-latest/bin/ipython -i
"""
The server run when lsdcRemote is used
"""
import os
from daq_macros import *
import daq_lib
from daq_lib import *
from robot_lib import *
from beamline_lib import *
import atexit
from daq_main_common import pybass_init
import logging
from logging import handlers
logger = logging.getLogger()
logging.getLogger().setLevel(logging.INFO)
logging.getLogger('ophyd').setLevel(logging.WARN)
logging.getLogger('caproto').setLevel(logging.WARN)
handler1 = handlers.RotatingFileHandler('lsdcServerLog.txt', maxBytes=5000000, backupCount=100)
handler2 = handlers.RotatingFileHandler('/var/log/dama/%slsdcServerLog.txt' % os.environ['BEAMLINE_ID'], maxBytes=5000000, backupCount=100)
myformat = logging.Formatter('%(asctime)s %(name)-8s %(levelname)-8s %(message)s')
handler1.setFormatter(myformat)
handler2.setFormatter(myformat)
logger.addHandler(handler1)
logger.addHandler(handler2)
sitefilename = ""
global command_list,immediate_command_list,z
command_list = []
immediate_command_list = []
z = 25
pybass_init()