just-paja/radio-drama-queen

View on GitHub
src/sagas/index.js

Summary

Maintainability
A
0 mins
Test Coverage
import keepAlive from 'redux-saga-restart'

import { all, fork } from 'redux-saga/effects'
import { logError, compatLogWarning } from '../clientLogger'

import soundBoards from '../soundBoards/sagas'
import soundCategories from '../soundCategories/sagas'
import soundGallery from '../soundGallery/sagas'
import soundLibraries from '../soundLibraries/sagas'
import soundStories from '../soundStories/sagas'
import soundWorkspaces from '../soundWorkspaces/sagas'
import sounds from '../sounds/sagas'

const sagas = [
  ...soundBoards,
  ...soundCategories,
  ...soundGallery,
  ...soundLibraries,
  ...soundStories,
  ...soundWorkspaces,
  ...sounds
]

export default function * rootSaga () {
  yield all(sagas.map(saga => fork(keepAlive(saga, {
    maxAttempts: 1,
    onEachError: compatLogWarning,
    onFail: logError
  }))))
}