This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
self.config.readfp(open(config_file_path)) | |
except IOError as (errno, strerror): | |
logging.warning('I/O error({0}): {1}'.format(errno, strerror)) | |
logging.warning('Please check that {0} exists'.format(config_file_path)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tasks import task1 | |
def get_results(queries): | |
query_procs = task1.delay(queries).get().join() | |
results = [] | |
for query_proc in query_procs: | |
# while the following iterate() is happening, the other query_procs are ignored. | |
# ideas on iterating over all of them at once? | |
for result in query_proc.iterate(): | |
yield result |