New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multitasking (Multi-Processing) [minor] #28
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks okay. Comments on some minor stuff.
LOGGER.error("Task failed:") | ||
LOGGER.error(_task_exception_str(task)) | ||
else: | ||
await sub.ack(tasks[task]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why you use task.exception()
instead of:
try:
await task
except Exception:
LOGGER.error("Task failed:")
(note that this is also how you're supposed to get the return value from the future, if you had one)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe I was following examples in the docs, which used the helper methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be interested to know which docs?
This reverts commit c71cf1b.
Enable multitasking, i.e. processing multiple tasks concurrently.
BREAKING CHANGE:
Users must now define the file type of the subprocess's input and output files. Previously, filepaths were defined. This change allows the files to be uniquely named. The user's
cmd
argument can include meta-variables{{INFILE}}
and{{OUTFILE}}
which are replaced for the unique filename at runtime.closes #26