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

how to use with redux-saga? #56

Open
jingyuLin1999 opened this issue Sep 1, 2021 · 1 comment
Open

how to use with redux-saga? #56

jingyuLin1999 opened this issue Sep 1, 2021 · 1 comment

Comments

@jingyuLin1999
Copy link

jingyuLin1999 commented Sep 1, 2021

could support function* worker

const mqQueue = require('fastq')({ select, fork }, worker, 1);
  eventbus.on(configs.topic_tools_status + configs.factoryCode + '_' + configs.shopCode.toLocaleUpperCase(), (msg) => {
      if (msg.Type_Data == 101 || msg.Type_Data == 106) mqQueue.push(msg) 
  })
  function* worker(arg, cb) {
      let bbb = this.select((state) => {
          return state.tools3Test
      });
      console.log(bbb)
      // yield put({ type: "consumerQueue", payload: { arg, cb } })
      cb(null, arg)
  }
@mcollina
Copy link
Owner

mcollina commented Sep 1, 2021

I'm a bit lost on who will receive the data that is going to be yielded.

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

No branches or pull requests

2 participants