コード例 #1
0
ファイル: system_check.py プロジェクト: Fclem/isbio
def check_ssh_tunnel():
	""" Check if ssh-tunnel container is responding (linked and up)


	:rtype: bool
	"""
	return utils.is_host_online(settings.SSH_TUNNEL_HOST, 2)
コード例 #2
0
def check_dotm():
	"""
	Check if Dotmatix db host is online and Dotmatix db connection is successful
	:rtype: bool
	"""
	# return status_button(rora.test_dotm_connect())
	if utils.is_host_online(settings.DOTM_SERVER_IP, 2):
		from breeze import rora
		return rora.test_dotm_connect()
	return False
コード例 #3
0
def check_cas():
	""" Check if CAS server is responding
	
	
	:rtype: bool
	"""
	if utils.is_host_online(settings.CAS_SERVER_IP, 2):
		try:
			return test_url(settings.CAS_SERVER_URL)
		except Exception:
			pass
	return False
コード例 #4
0
def check_rora():
	"""
	Check if RORA db host is online and RORA db connection is successful
	:rtype: bool
	"""
	try:
		if utils.is_host_online(settings.RORA_SERVER_IP, '2'):
			from breeze import rora
			return rora.test_rora_connect()
	except Exception as e:
		print e
	return False
コード例 #5
0
ファイル: system_check.py プロジェクト: Fclem/isbio2_old
def check_cas(request):
	""" Check if CAS server is responding

	:type request:
	:rtype: bool
	"""
	from breeze.auxiliary import proxy_to
	if utils.is_host_online(settings.CAS_SERVER_IP, 2):
		try:
			r = proxy_to(request, '', settings.CAS_SERVER_URL, silent=True, timeout=3)
			if r.status_code == 200:
				return True
		except Exception:
			pass
	return False
コード例 #6
0
ファイル: system_check.py プロジェクト: Fclem/isbio2_old
def check_sge():
	""" Check if SGE queue master server host is online, and drmaa can initiate a valid session

	:rtype: bool
	"""
	if utils.is_host_online(settings.SGE_MASTER_IP, 2):
		try:
			import drmaa
			s = drmaa.Session()
			s.initialize()
			s.exit()
			return True
		except Exception as e:
			raise e
	return False
コード例 #7
0
ファイル: system_check.py プロジェクト: findcomrade/isbio
def check_sge():
	"""
	Check if SGE queue master server host is online, and drmaa can initiate a valid session
	:rtype: bool
	"""
	if utils.is_host_online(settings.SGE_MASTER_IP, 2):
		try:
			import drmaa
			s = drmaa.Session()
			s.initialize()
			s.exit()
			return True
		except Exception as e:
			# pass
			raise e
	return False
コード例 #8
0
def check_file_server():
	"""
	Check if file server host is online
	:rtype: bool
	"""
	return utils.is_host_online(settings.FILE_SERVER_IP, 2)