class ServerOptions(usage.Options): optParameters = [ ['worker-listen', 'w', '', "workers listen address"], ['worker-port', '', 7888, "workers port number"], ['rpc-listen', 'r', '', "RPC listen address"], ['rpc-port', '', 7889, "RPC listen port"], ['database', 'db', 'sioworkersd.db', "database file path"], ['scheduler', 's', getDefaultSchedulerClassName(), "scheduler class"], ]
class ServerOptions(usage.Options): optParameters = [ ['worker-listen', 'w', '', "workers listen address"], ['worker-port', '', 7888, "workers port number"], ['rpc-listen', 'r', '', "RPC listen address"], ['rpc-port', '', 7889, "RPC listen port"], ['database', 'db', 'sioworkersd.db', "database file path"], ['scheduler', 's', getDefaultSchedulerClassName(), "scheduler class"], [ 'max-task-ram', '', 2048, "maximum task required RAM (in MiB) allowed by the scheduler" ] ]
def testDefaultSchedulerExistence(): module_name, class_name = getDefaultSchedulerClassName() \ .rsplit('.', 1) # can throw ImportError and fail test module = importlib.import_module(module_name) assert hasattr(module, class_name)