Skip to content

Standardize some BAC methods #1463

Closed
Closed
@prioux

Description

@prioux

In the BackgroundActivity core class, provide the following base methods:

def failed_items
def successful_items
def remaining_items

We already have the following helpful methods that can be used to implement them:

def selected_items_from_nil_messages
def selected_items_from_present_messages
def selected_items_from_messages_matching(regex)

These last three method should become protected, and the main methods of this issue (failed_items, successful_items and remaining_items) will become the real interface.

Subclasses can overrride them or simply invoke the appropriate selected_items_* methods.

By default (because it's the most common situation), failed_items will just invoke selected_items_from_present_messages and successful_items will invoke selected_items_from_nil_messages.

The method remaining_items is always just what's not yet processed, so the tail end of the items list.

  • Add methods
  • Adjust all subclasses, as necessary (only those that don't follow the "NIL message means success" convention)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions