flask-apscheduler
flask-apscheduler copied to clipboard
Better readme / documentaion
I have found that a GET request to /scheduler produces this helpful document: [ { "description": "get_scheduler_info", "endpoint": "/scheduler", "method": "GET" }, { "description": "add_job", "endpoint": "/scheduler/jobs", "method": "POST" }, { "description": "get_jobs", "endpoint": "/scheduler/jobs", "method": "GET" }, { "description": "get_job", "endpoint": "/scheduler/jobs/<job_id>", "method": "GET" }, { "description": "delete_job", "endpoint": "/scheduler/jobs/<job_id>", "method": "DELETE" }, { "description": "update_job", "endpoint": "/scheduler/jobs/<job_id>", "method": "PATCH" }, { "description": "pause_job", "endpoint": "/scheduler/jobs/<job_id>/pause", "method": "POST" }, { "description": "resume_job", "endpoint": "/scheduler/jobs/<job_id>/resume", "method": "POST" }, { "description": "run_job", "endpoint": "/scheduler/jobs/<job_id>/run", "method": "POST" } ]
add job request:
{ "error_message": "A setup function was called after the first request was handled. This usually indicates a bug in the application where a module was not imported and decorators or other functionality was called too late.\nTo fix this make sure to import all your view modules, database models and everything related at a central place before the application starts serving requests." }
@viniciuschiele what do you think about turning on GitHub Pages for the repo and using sphinx docs? If you add a workflow to publish to pages, I can give a stab at adding some more docs :)
name: CI
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
docs:
runs-on: ubuntu-latest
container: python:3
steps:
- name: get code
uses: actions/checkout@v1
- name: build docs
run: |
pip install sphinx Pygments furo sphinx-copybutton sphinx-inline-tabs myst-parser colorama sphinx-panels
cd docs
sphinx-build -E -b html . _build
- name: publish
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build
Docs are now linked in the readme: https://viniciuschiele.github.io/flask-apscheduler/. PR's to improve them are welcome.