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

Adding how to use builtin scheduler in README #209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

balajeerc
Copy link
Contributor

A small snippet in the README showing how to use the builtin scheduler. Currently this information needs to be gleaned by looking at the tests.

Copy link
Contributor

@maelorn maelorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this out! Could you change include the two changes I've mentioned before the merge ?

@@ -139,6 +139,36 @@ $ mrq-worker fetches

You can interrupt the worker with Ctrl-C once it is finished.

### Run it via the built-in scheduler

Create a `schedule.py` file with the following code:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want you can just edit the default config file which is mrq-config.py

Run the schedule using:

```
mrq-run --scheduler --config schedule.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you should run a scheduler worker with mrq-worker --scheduler fetch_queue . This will spawn a [scheduler greenlet](https://github.com/pricingassistant/mrq/blob/master/mrq/worker.py#L141 that will run the scheduler every SCHEDULER_INTERVAL s)

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

Successfully merging this pull request may close these issues.

None yet

2 participants