예제 #1
0
import sys, logging, os
from optparse import OptionParser
from ConfigParser import SafeConfigParser as ConfigParser
from lofarpipe.support.clusterhandler import ClusterHandler

parser = OptionParser()
parser.add_option(
    "--config", help="Pipeline configuration file", default="~/.pipeline.cfg"
)
parser.add_option(
    "--num-engines", help="Number of engines per node", default=8
)
options, args = parser.parse_args()

my_logger = logging.getLogger()
stream_handler = logging.StreamHandler(sys.stdout)
formatter = logging.Formatter(
    "%(asctime)s %(levelname)-7s: %(message)s",
    "%Y-%m-%d %H:%M:%S"
)
stream_handler.setFormatter(formatter)
my_logger.addHandler(stream_handler)
my_logger.setLevel(logging.DEBUG)

config = ConfigParser()
config.read(os.path.expanduser(options.config))

clusterhandler = ClusterHandler(config)
clusterhandler.start_cluster(options.num_engines)

예제 #2
0
Start IPython cluster.
"""

import sys, logging, os
from optparse import OptionParser
from configparser import SafeConfigParser as ConfigParser
from lofarpipe.support.clusterhandler import ClusterHandler

parser = OptionParser()
parser.add_option("--config",
                  help="Pipeline configuration file",
                  default="~/.pipeline.cfg")
parser.add_option("--num-engines",
                  help="Number of engines per node",
                  default=8)
options, args = parser.parse_args()

my_logger = logging.getLogger()
stream_handler = logging.StreamHandler(sys.stdout)
formatter = logging.Formatter("%(asctime)s %(levelname)-7s: %(message)s",
                              "%Y-%m-%d %H:%M:%S")
stream_handler.setFormatter(formatter)
my_logger.addHandler(stream_handler)
my_logger.setLevel(logging.DEBUG)

config = ConfigParser()
config.read(os.path.expanduser(options.config))

clusterhandler = ClusterHandler(config)
clusterhandler.start_cluster(options.num_engines)
예제 #3
0
#!/usr/bin/python
"""
Stop IPython cluster.
"""

import sys, logging, os
from optparse import OptionParser
from ConfigParser import SafeConfigParser as ConfigParser
from lofarpipe.support.clusterhandler import ClusterHandler

parser = OptionParser()
parser.add_option("--config",
                  help="Pipeline configuration file",
                  default="~/.pipeline.cfg")
options, args = parser.parse_args()

my_logger = logging.getLogger()
stream_handler = logging.StreamHandler(sys.stdout)
formatter = logging.Formatter("%(asctime)s %(levelname)-7s: %(message)s",
                              "%Y-%m-%d %H:%M:%S")
stream_handler.setFormatter(formatter)
my_logger.addHandler(stream_handler)
my_logger.setLevel(logging.DEBUG)

config = ConfigParser()
config.read(os.path.expanduser(options.config))

clusterhandler = ClusterHandler(config)
clusterhandler.stop_cluster()
예제 #4
0
Stop IPython cluster.
"""

import sys, logging, os
from optparse import OptionParser
from ConfigParser import SafeConfigParser as ConfigParser
from lofarpipe.support.clusterhandler import ClusterHandler

parser = OptionParser()
parser.add_option(
    "--config", help="Pipeline configuration file", default="~/.pipeline.cfg"
)
options, args = parser.parse_args()

my_logger = logging.getLogger()
stream_handler = logging.StreamHandler(sys.stdout)
formatter = logging.Formatter(
    "%(asctime)s %(levelname)-7s: %(message)s",
    "%Y-%m-%d %H:%M:%S"
)
stream_handler.setFormatter(formatter)
my_logger.addHandler(stream_handler)
my_logger.setLevel(logging.DEBUG)

config = ConfigParser()
config.read(os.path.expanduser(options.config))

clusterhandler = ClusterHandler(config)
clusterhandler.stop_cluster()