Skip to content

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 ?


### 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.

2 participants