Skip to content

Shorten various implementations of running multiple commands when they are too long #33

Description

@tonyx

Some implementations of long list of commands follow a logical flow as

  1. retrieve the state
  2. run the command
  3. store the events
  4. update the cache

(note: in a separate branch I want that between of 3 and 4 there will also be the 'send messages to a message bus')

This flow is reasonable but the details may make it expose nitty-gritty details that exploded in dozens of lines of code.
Can you simplify it and prove that everything is still fine because all the tests still run and, moreover, you added specific
new tests about?

Consider that the idea of using 'preexecuted commands' (aimed to make the command execution agnostic respect to
its specific type) may help at it (not sure).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions