Tags: chrisjbillington/zprocess
Tags
Minor changes to task repetition in Task and TaskQueue Tasks have an `__eq__` method that compares an `_id` attribute, this is preserved across `copy` which is done when a repeated task is re-added to the queue. This can be used to check if a task is in the queue with e.g. `if task in tasks`, which will evaluate to `True` if a copy of the task is in the queue, as it would be for a repeated task. Also, manually re-adding a task to the queue resets its `_called` attribute so it doesn't raise an exception when next called. These changes are to support holding a reference to a task that has `repeat=True`, and being able to check if (a copy of) that task is in the queue, and being able to cancel and re-add it.
workflow: pin macos version to 10.15 for now This is because xcode 11 is not available on newer macos, and xcode 11 is required for building conda packages. Here in zprocess we don't actually need to do compilation since we're a pure package, but we'll keep this in line with the standard workflow across all our projects.
Workaround for raising exceptions with custom arguments We can't anticipate what their arguments will be, so just return a RuntimeError in this case. Almost all exceptions take a single message argument, but custom ones can do anything they like. The example I came across is pyserial's serial.serialutil.PortNotOpenError, which accepts no arguments.
Modernise workflow sync from rpanderson/workflow-sandbox@f03ea46
PreviousNext