# HOST = 'localhost'
import os

HOST = 'localhost'
PORT = 1970
USER_NAME = 'apache' # If you want to do parallel computation, change it to a user_name that can use the R package "SNOW"
USER_NAME = "apache" # If you want to do parallel computation, change it to a user_name that can use the R package "SNOW"
GRP_NAME = 'apache'
#lam_dir = '' # set up this to enable lam if the daemon is launched by system (boot or reboot)
if os.name == 'posix': # unix-alike system
	LOG_NAME = '/var/log/webarray/analyze_d.log'
	PID_NAME = '/var/log/webarray/analyze_d.pid'
else: # typically windows
	LOG_NAME = 'analyze_d.log'
	PID_NAME = 'analyze_d.pid'
REQUEST_LIFE = 0 #31*6 #40 # the days of requests and uploaded files can survive on server, afterwards, they will be deleted. A number no more than zero will disable it.
OPTIMIZE_DAYS = 0 # 31 * 2 # days for optimize database. A number no more than 0 will disable it.

JOB_ON_LOCAL_ONLY = True # only launch jobs on localhost (but parallel computation may use cluster - see the line below). If false, job can be run on other nodes alone.
PARALLEL_IN_NODE_ONLY = False # limit parallel computation within a node, this can be faster for light-weight duties.
TRY_RSA = True

users_dir = '/home/xxia/public_html/webarray/users' # this may be updated by cgitools.py

join_chs = ' /// '

freeze_demo = False

email_admin = 'xqxia70@gmail.com'
email_admin1 = 'yipengw@gmail.com'
bug_report = 'Please report bugs to <a href=mailto:%s>Xiao-Qin Xia</a><br>For questions about analysis, please contact <a href=mailto:%s>Xiao-Qin Xia</a> or <a href=mailto:%s>Yipeng Wang</a><br><a href=http://www.vrisd.org>Vaccine Research Institute San Diego</a>' % (email_admin, email_admin, email_admin1)
bug_report_fmt = '''<p><spacer type='vertical' size=250>
<table><tr><td height=120></td></table>
<hr width=50%% align=center>
<center>
<font size=-1>
	%s</font>
</center>
''' % bug_report

color_th = '#9db3b3'
color_td = '#d2dbe7'
style_tb = '''
<style>
.mytb {
}
.mytb th {
 background-color: %s;
}
.mytb tr {
 background-color: expression((this.rowIndex %% 2 == 0) ? '%s' : '#fff');
}
</style>
''' % (color_th, color_td) # style works for IE, not in FF



