This is for consistency with the `blender_cmd` setting of Blender render
commands. The splitting is done so that extra CLI commands can be given
in the Manager config.
This requires FFmpeg to be installed (not just for the command, but also
for running the accompanying unit test). Because of this external
dependency, the worker has to declare task_type='video-encoding' in its
configuration file before it gets such tasks. This is not enabled by
default.
The 'may-i-run' endpoint may say 'no' to us running task X, but when the
response comes in and is handled the worker may already be working on task
Y. This case is now recognised, and the 'no' will be ignored.
Now the log is sent to
`flamenco_worker.commands.blender_render.line.(task_id=xxx, command_idx=0)`
instead of
`flamenco_worker.commands.blender_render.(task_id=xxx, command_idx=0).line`
This makes configuration of log levels easier.
This makes a clearer distinction between Flamenco tasks ('task') and
AsyncIO tasks ('future'). The AsyncIO Task class is a subclass of its
Future class.
Haven't written the mypy-running unit test yet, that'll come when all
warnings are solved. This commit doesn't solve all of them, just some
simple ones.
This also means that we need a `tests/__init__.py` file; this file makes
py.test undertand what is our sources directory, and thus allows them to
`import flamenco_worker`. As a result, the test imports from tests/*.py
need to change to relative imports.
This prevents multiple subprocess commands running at once. They shouldn't
be doing that in the first place, but we have a strange bug where multiple
Blenders seem to be running on the same machine.
This check is performed every time before trying to fetch a task. It checks
for readability or writability of certain filesystem paths, to prevent
tasks from failing when the shared storage hasn't been mounted. Instead,
the worker will go to `error` status and sleep for 10 minutes before trying
again.