scripts/support/rfam_queue_watcher.py
def check_queue_status(queue_name):
	"""
	Checks the queue status specified by queue_name
	
	queue_name: The name of the queue to check
	
	returns: True if running, False if Not Running
	"""

	cmd_args = ["/etc/init.d/%s" % queue_name, "status"]
	
	process = sp.Popen(cmd_args, stdin=sp.PIPE, stdout=sp.PIPE, stderr=sp.PIPE)
	response, err = process.communicate()

	# fetch the last element from the list
	response_str = response.strip().split(' ')[-1]
	
	# status initialization
	status = False

	if response_str.find("[Running]") != -1:
		status = True
	
	return status

	Checks the queue status specified by queue_name
	
	queue_name: The name of the queue to check
	
	returns: True if running, False if Not Running
	
Checks the queue status specified by queue_name
queue_name: The name of the queue to check

True if running, False if Not Running
Checks the queue status specified by queue_name queue_name : The name of the queue to check True if running False if Not Running
def check_queue_status(queue_name):
	cmd_args = ["/etc/init.d/%s" % queue_name, "status"]
	process = sp.Popen(cmd_args, stdin=sp.PIPE, stdout=sp.PIPE, stderr=sp.PIPE)
	response, err = process.communicate()
	response_str = response.strip().split(' ')[-1]
	status = False
	if response_str.find("[Running]") != -1:
		status = True
	return status
def check_queue_status ( queue_name ) : cmd_args = [ "/etc/init.d/%s" % queue_name , "status" ] process = sp . Popen ( cmd_args , stdin = sp . PIPE , stdout = sp . PIPE , stderr = sp . PIPE ) response , err = process . communicate ( ) response_str = response . strip ( ) . split ( ' ' ) [ - 1 ] status = False if response_str . find ( "[Running]" ) != - 1 : status = True return status
Checks the queue status specified by queue_name
queue_name: The name of the queue to check
Checks the queue status specified by queue_name queue_name : The name of the queue to check
"""
	Checks the queue status specified by queue_name
	
	queue_name: The name of the queue to check
	
	returns: True if running, False if Not Running
	""" # fetch the last element from the list # status initialization
queue_name