Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Project template for WorkerService #21

Closed
CesarD opened this issue Dec 19, 2022 · 0 comments · Fixed by #66
Closed

FEATURE: Project template for WorkerService #21

CesarD opened this issue Dec 19, 2022 · 0 comments · Fixed by #66
Assignees
Labels
enhancement New feature or request

Comments

@CesarD
Copy link
Collaborator

CesarD commented Dec 19, 2022

Detailed Description

Create a new project template for a Worker Service on the solution.

Context

The backend is not only comprised by APIs; many times there's need to run unattended services that perform some processing in the background without direct interaction with the users. These services are also useful for offloading some responsibilities from APIs, decoupling responsibilities and allow for better balancing of the workload.

Possible Implementation

Create a Worker Service that hosts a MassTransit consumer of a message emitted by the API once a Product gets created to serve as a sample of how to configure this scenario.
Consumer can do as little as just log the operation for sample purposes.
Project should have its own flag and include all the MassTransit boilerplate depending on the respective flag.

@CesarD CesarD changed the title Project template for WorkerService MT-Consumer FEATURE: Project template for WorkerService MT-Consumer Jan 28, 2024
@CesarD CesarD changed the title FEATURE: Project template for WorkerService MT-Consumer FEATURE: Project template for WorkerService Jan 28, 2024
@CesarD CesarD self-assigned this Jan 28, 2024
CesarD added a commit that referenced this issue Jan 29, 2024
@CesarD CesarD added the enhancement New feature or request label Jan 29, 2024
CesarD added a commit that referenced this issue Jan 30, 2024
@CesarD CesarD closed this as completed in #66 Feb 7, 2024
CesarD added a commit that referenced this issue Feb 7, 2024
## Description
Include a Worker Service project template for implementing background
services.
A new flag has been introduced for enabling generating the Worker
Service which will be disabled by default: `-w` / `--workerService`.
Only if present the Worker Service project will be rendered in the
solution.

## Related Issue
Closes #21

## How Has This Been Tested?
Multiple projects have been generated with different combinations: with
MT implementation and w/o WorkerService and viceversa, and with both
flags present and also without them both.
Existing tests have been updated to conditionally include extra tests
during rendering depending on the flags that have been enabled.

## Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)

## Checklist:
- [X] My code follows the code style of this project.
- [X] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [X] I have read the **CONTRIBUTING** document.
- [X] I have added/updated tests to cover my changes.
- [X] All new and existing tests passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant