Skip to content

Commit

Permalink
Merge pull request #26 from vtex-apps/feature/remove-unecessary-events
Browse files Browse the repository at this point in the history
Remove messages middleware and logic
  • Loading branch information
vwraposo authored Mar 25, 2020
2 parents e867512 + 5c54da4 commit ae75c68
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 128 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Removes messages middleware

## [0.9.2] - 2020-03-24

Expand Down
44 changes: 0 additions & 44 deletions node/events/saveIOMessage.ts

This file was deleted.

60 changes: 0 additions & 60 deletions node/events/unwrap.ts

This file was deleted.

21 changes: 1 addition & 20 deletions node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import {
} from '@vtex/api'

import { Clients } from './clients'
import { saveIOMessage } from './events/saveIOMessage'
import {
unwrapBrandTranslatables,
unwrapCategoryTranslatables,
unwrapProductTranslatables,
unwrapSkuTranslatables,
} from './events/unwrap'
import { initialize } from './middlewares/initialize'
import { saveInternalBrandRoute } from './middlewares/internals/saveInternalBrandRoute'
import { saveInternalCategoryRoute } from './middlewares/internals/saveInternalCategoryRoute'
Expand Down Expand Up @@ -68,31 +61,19 @@ const clients: ClientsConfig<Clients> = {
export default new Service<Clients, State, ParamsContext>({
clients,
events: {
broadcasterBrand: [
throttle,
initialize,
tenant,
saveInternalBrandRoute,
unwrapBrandTranslatables,
saveIOMessage,
],
broadcasterBrand: [throttle, initialize, tenant, saveInternalBrandRoute],
broadcasterCategory: [
throttle,
initialize,
tenant,
saveInternalCategoryRoute,
unwrapCategoryTranslatables,
saveIOMessage,
],
broadcasterProduct: [
throttle,
initialize,
tenant,
saveInternalProductRoute,
unwrapProductTranslatables,
saveIOMessage,
],
broadcasterSku: [throttle, unwrapSkuTranslatables, saveIOMessage],
searchUrlsCountIndex: [
throttle,
settings,
Expand Down
4 changes: 0 additions & 4 deletions node/service.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
"maxReplicas": 4,
"workers": 1,
"events": {
"broadcasterSku": {
"sender": "vtex.broadcaster-worker",
"keys": ["broadcaster.sku"]
},
"broadcasterProduct": {
"sender": "vtex.broadcaster-worker",
"keys": ["broadcaster.product"]
Expand Down

0 comments on commit ae75c68

Please sign in to comment.