Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/explanations/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ a plan has started, finished, paused, errored etc. See the example below:
![sequence of event emission compared to plan start/finish, in a complicated case](../images/bluesky-events.png)

Note the gap between the start of the plan and the issue of the first [`run start document`](https://blueskyproject.io/event-model/main/user/explanations/data-model.html#run-start-document), and the similar gap
for the stop document vs end of the plan, thsse are typically used for setup and cleanup.
for the stop document vs end of the plan, these are typically used for setup and cleanup.
Also note that a plan can produce an arbitrary number of runs. This decoupling is fine in an IPython terminal
because a human user can see when a plan has started, can see when it's finished and can see which runs are
associated with which plans.

## New Events

For the case of automation, we introduce a new set of events outside of the event model, specifically
For the case of automation, we introduce a new set of events outside the event model, specifically
pertaining to the running of the plan and state of the `RunEngine`. At a minimum, an event is emitted
every time the engine:

Expand Down
3 changes: 2 additions & 1 deletion src/blueapi/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def set_up_stream_handler(
Args:
logger: Logger to attach handler to
logging_config: LoggingConfig
filters: list of filters
"""
stream_handler = logging.StreamHandler()
stream_handler.setLevel(logging_config.level)
Expand Down Expand Up @@ -137,7 +138,7 @@ class IBMColorBlindSafeColors(enum.Enum):


class ColorFormatter(logging.Formatter):
"""Colors level_name of log using IBM color blind safe palette."""
"""Colors level_name of log using IBM color-blind safe palette."""

def _level_colour(self, level_no: int) -> tuple[int, int, int] | None:
match level_no:
Expand Down
1 change: 0 additions & 1 deletion src/blueapi/service/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ def get_tasks(
Retrieve tasks based on their status.
The status of a newly created task is 'unstarted'.
"""
tasks = []
if task_status:
add_span_attributes({"status": task_status})
try:
Expand Down
2 changes: 1 addition & 1 deletion src/blueapi/worker/task_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def get_tasks_by_status(self, status: TaskStatusEnum) -> list[TrackableTask]:
"""
Retrieve a list of tasks based on their status.
Args:
TaskStatusEnum: The status to filter tasks by.
status TaskStatusEnum: The status to filter tasks by.
Returns:
list[TrackableTask]: A list of tasks that match the given status.
"""
Expand Down
Loading