Skip to content

Services: Make services of services also be persistent - #493

Merged
aomarks merged 5 commits into
servicefrom
service.13
Oct 30, 2022
Merged

Services: Make services of services also be persistent#493
aomarks merged 5 commits into
servicefrom
service.13

Conversation

@aomarks

@aomarks aomarks commented Oct 30, 2022

Copy link
Copy Markdown
Member

Previously, only a directly invoked service persisted across watch iterations. But actually, if one of those services itself depends on a service, then that service should persist too.

So this PR renames "isDirectlyInvoked" to "isPersistent", and expands its definition to include services of services. We call non-persistent services "ephemeral".

Also allows start to be called multiple times (an obvious case to handle, just hadn't hit it in the tests so far).

Example:

                       start
                   (no-command)
                    /        \
                   ▼          ▼
             serve:api      serve:static
  (persistent service)      (persistent service)
          |                          |
          ▼                          ▼
      serve:db                   build:assets
  (persistent service)            (standard)
                                     |
                                     ▼
                             serve:playwright
                            (ephemeral service)

Part of #33

@aomarks
aomarks requested a review from justinfagnani October 30, 2022 18:04
@aomarks
aomarks merged commit 94990ab into service Oct 30, 2022
@aomarks
aomarks deleted the service.13 branch October 30, 2022 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants