🔧 Changes to support BullMQ on the service layer

1. Removed socket connection from context
2. Added Redux middleware to persist socket connection
3. Removed amqplib and RabbitMQ support
4. Removed RabbitMQ from docker-compose configuration
5. Removed a proxy route to IMS from the facade
6. Refactored file actions to support the new way of socket event emitting and listening
This commit is contained in:
2021-10-27 07:46:21 -07:00
parent 8fbea27fb2
commit 56d22a28a0
16 changed files with 151 additions and 270 deletions

View File

@@ -3,16 +3,20 @@ import { createStore, applyMiddleware, compose } from "redux";
import { createBrowserHistory } from "history";
import thunk from "redux-thunk";
import createRootReducer from "../reducers";
import socketIO from "socket.io-client";
import socketIoMiddleware from "redux-socket.io-middleware";
const io = socketIO(`http://localhost:3001`);
export const history = createBrowserHistory();
export default function configureStore(initialState) {
const configureStore = (initialState) => {
const store = createStore(
createRootReducer(history),
initialState,
compose(
applyMiddleware(thunk, routerMiddleware(history)),
applyMiddleware(socketIoMiddleware(io), thunk, routerMiddleware(history)),
// window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(),
),
);
return store;
}
};
export default configureStore;