59 """ |
59 """ |
60 sys.path.insert(1, path) |
60 sys.path.insert(1, path) |
61 try: |
61 try: |
62 importedModule = __import__(module, globals(), locals(), [], 0) |
62 importedModule = __import__(module, globals(), locals(), [], 0) |
63 self.services[fn] = importedModule.initService() |
63 self.services[fn] = importedModule.initService() |
64 try: |
64 with contextlib.suppress(AttributeError): |
65 self.batchServices["batch_" + fn] = ( |
65 self.batchServices["batch_" + fn] = ( |
66 importedModule.initBatchService() |
66 importedModule.initBatchService() |
67 ) |
67 ) |
68 except AttributeError: |
|
69 pass |
|
70 return 'ok' |
68 return 'ok' |
71 except ImportError: |
69 except ImportError: |
72 return 'Import Error' |
70 return 'Import Error' |
73 |
71 |
74 def __send(self, fx, fn, data): |
72 def __send(self, fx, fn, data): |