indexer: Configuration setup missing from orchestrator
The latest change in the orchestrator ended up removing the configuration part:
Error 1:
raceback (most recent call last):
File "/usr/lib/python3/dist-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/lib/python3/dist-packages/celery/app/trace.py", line 438, in __protected_call__
return self.run(*args, **kwargs)
File "/usr/lib/python3/dist-packages/swh/scheduler/task.py", line 161, in run
raise e from None
File "/usr/lib/python3/dist-packages/swh/scheduler/task.py", line 158, in run
result = self.run_task(*args, **kwargs)
File "/usr/lib/python3/dist-packages/swh/indexer/tasks.py", line 24, in run_task
indexer = self.Indexer().run(*args, **kwargs)
File "/usr/lib/python3/dist-packages/swh/indexer/orchestrator.py", line 97, in run
for name, (idx_class, filtering, batch_size) in self.indexers.items():
AttributeError: 'OrchestratorAllContentsIndexer' object has no attribute 'indexers'
Error 2:
[2018-10-25 18:43:44,636: ERROR/MainProcess] Task swh.indexer.tasks.OrchestratorAllContents[be6200f3-dd00-4900-b556-b620308dae89] raised unexpected: AttributeError("'OrchestratorAllContentsIndexer' object has no attribute 'config'",)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/lib/python3/dist-packages/celery/app/trace.py", line 438, in __protected_call__
return self.run(*args, **kwargs)
File "/usr/lib/python3/dist-packages/swh/scheduler/task.py", line 161, in run
raise e from None
File "/usr/lib/python3/dist-packages/swh/scheduler/task.py", line 158, in run
result = self.run_task(*args, **kwargs)
File "/usr/lib/python3/dist-packages/swh/indexer/tasks.py", line 24, in run_task
indexer = self.Indexer().run(*args, **kwargs)
File "/usr/lib/python3/dist-packages/swh/indexer/orchestrator.py", line 73, in __init__
self.prepare_tasks()
File "/usr/lib/python3/dist-packages/swh/indexer/orchestrator.py", line 76, in prepare_tasks
indexer_names = list(self.config['indexers'])
AttributeError: 'OrchestratorAllContentsIndexer' object has no attribute 'config'
Migrated from T1293 (view on Phabricator)