tasks: fix a bug with esendpoint when output is not elastic

Ramón Hernández García requested to merge rmnhg/gsicrawler:master into master

Before this commit, esendpoint was always parsed, even when the output was not set to elasticsearch. Now it is only parsed when the output is set to elasticsearch. It also throws a custom error when the parameter esendpoint is empty and the output is set to elasticsearch.

This commit fixes the error "'hosts' must be a list of URLs, NodeConfigs, or dictionaries" when a crawler was invoked with the output not set to elasticsearch and with esendpoint empty.

Merge request reports