def setup(self): # internal management classes self.vMonitor = RRDVermontMonitor(self.xpaths, self.names, self.moninterval) self.rInterface = RemoteInterface(self.dir, self.cfgfile, self.logfile, self.vMonitor, self.names) # RPC server self.server = VCRPCServer((self.bindAddress, self.listenPort), allow_none=True, logRequests=False) self.server.allow_reuse_address = True self.server.allowedIp = self.allowedIp #IGNORE:W0201 self.server.register_instance(self.rInterface)
import DatabaseModel from config import SSH_HOST import config # The host to which the computer is connected need to be recognized with the pem keys!! # How to run this script: # PYTHONPATH='.' luigi --module luigi_pipeline AnnotateAlignment --pid 1 --sid 4 --input /Volumes/data/dev/nanopore/pipeline/storage/rawreads.fasta --barcode /Volumes/data/dev/nanopore/pipeline/storage/barcodes.fasta remote_storage_root = config.remote_storage # Get the parameters stored in the database using the given sample id. parameters = DatabaseModel.parameters() report = DatabaseModel.status() results = DatabaseModel.Results() remoteInterface = RemoteInterface() ###################################################################################################################################### ###################################################################################################################################### class CreateEnv(luigi.Task): stage = 'CREATING ENVIRONMENT IN CLUSTER' def output(self): parameters.setParameters(parameters.data) status = RemoteTarget(parameters.data['remote_storage'], SSH_HOST) # if status: stage.pushStatus(parameters.data['id'], stage.CreateEnv) return status def run(self):