Ejemplo n.º 1
0
    def __init__(self):
        set_exit_handler(self._exit_handler)

        usr = "******"
        passwd = "store_passwd"
        
        home_path = config.server.get('home_path', os.environ['HOME'])
                
        iMagisCommunicator_path = os.path.join(home_path, 'iMagisCommunicator')
        upload_path = os.path.join(iMagisCommunicator_path, 'uploaded')
        failed_files = os.path.join(upload_path, 'failed_files')
        logs_path = os.path.join(iMagisCommunicator_path, 'logs')
        www_path = os.path.join(iMagisCommunicator_path, 'download')
        move_path = os.path.join(iMagisCommunicator_path, 'dcm_move')
        if os.path.isdir(iMagisCommunicator_path) == False:
            os.mkdir(iMagisCommunicator_path)
            os.mkdir(upload_path)
            os.mkdir(failed_files)
            os.mkdir(logs_path)
            os.mkdir(www_path)
            os.mkdir(move_path)
      
        self.store_server = StoreService(
            upload_path,
            failed_files,
            user=usr,
            password=passwd
        )
        self.move_server = MoveFilesXMLRPC(
            logs_path, 
            config, 
            www_path,
            move_path,
            user = usr, 
            password= passwd
        )
        self.find_server = WCFind(
            logs_path, 
            config, 
            user = usr, 
            password = passwd
        )
        self.web_server = static.File(www_path)
Ejemplo n.º 2
0
 def __init__(self):
     self.cron = Cron(config.tasks)
     set_exit_handler(self._exit_handler)
Ejemplo n.º 3
0
 def __init__(self):
     self.cron = Cron(config.tasks)
     set_exit_handler(self._exit_handler)