@task('Stopping Modules')
def stop(module='*'):
	""" Stop [module] """

	for module, pid, pidfile in running_modules(module):
		shell('kill %s' % pid)
		shell('rm -f %s' % pidfile)
		shell('rm -f tmp/sockets/*/%s.sock' % module)

		puts(fore.cyan("%-10s" % module) + "(pid: %s) stopped" % fore.red(pid))
dataset/ETHPy150Open alexcepoi/pyscale/pyscale/tools/tasks.py/stop/original