[SOLVED] How to automate (execute) functions based on post date

Hey Meteors,

Quite general question here - I want to build a system that rewards authors for different post types (example - payout (via Stripe API) certain amount of $$$ to the host of event).

The event would have a DateTime of its occurrence and one this DateTime passes it should fire the function that completes the payout.

Using Meteor/React

Any suggestions are much appreciated!

You need a jobs queue.

Meteor package:

  • steve jobs

Npm package:

  • bull
  • bee-queue
1 Like

Thank you RJ! Will read up on these!

Any chance you know some package to tie Steve Jobs Developer Friendly GUI to React instead of Blaze?

I’m personally using bee-queue. But nevertheless, if I’m going to use Steve Jobs, I’m going to create a stand-alone app with the GUI. Therefore, it does not have to affect my main app.

So you can keep React with your main app and then use blaze on your jobs gui app.

That’s a cool idea, could you please briefly explain how would one connect standalone app with the GUI to the existing app?

What would be the method referencing/calling process (how to make the defined methods in standalone app available in the main app)?

I am not that familiar with Meteor: Steve Jobs. In my own projects, I use bee-queue in the app to only create jobs. No UI.

I have another project which connects to the db used by bee-queue to manage the jobs with an admin-like UI

@msavin might be able to guide you better

Steve Jobs works easy with Meteor - no need to set up another service, database, etc.

The GUI package is made in Blaze, but its only for development purposes. In production, it will not be added.

If you want a production GUI, you can integrate Steve Jobs with Meteor Candy, which will be coming in React flavor very soon.

@rjdavid thanks for the reference!

@msavin awesome, MeteorCandy looks intriguing, will check it in future.

Tho, the main confusion for me atm is how to integrate Steve Jobs - either to create separate app as RJ David suggested, or to add it to the existing main Meteor/React app?

And if separate how to connect the GUI app to the main app, perhaps there’s a tutorial somewhere or something similar?

On your Meteor server will be fine :slight_smile: that’s how its intended to be used. If your volume gets really high, then you can consider splitting it out.

1 Like

Awesome, thanks!

Is there any rough metrics of any sort for what would be considered really high volume? (very roughly)

No idea, really, but you can think of a job as a method call. It’s got about the same overhead.

Since, jobs run one at a time per queue, I suspect the impact will be not noticeable.

1 Like