@app.get("/schedule/show_schedules/",response_model=CurrentScheduledJobsResponse,tags=["schedule"])
async def get_scheduled_syncs():
"""
Will provide a list of currently Scheduled Tasks
"""
schedules = []
for job in Schedule.get_jobs():
schedules.append({"job_id": str(job.id), "run_frequency": str(job.trigger), "next_run": str(job.next_run_time)})
return {"jobs":schedules}
add_job()
?
so İ have a Bot
class which is from twitchio
package, and that's running asynchronously.
what would I have to do if I wanted to make apshceduler and twitchio bot run together?
aim: I will update the data periodically so my bot will respond faster
from twitchio.ext import commands
class Bot(commands.Bot):
def __init__(self):
...
bot = Bot()
bot.run() # there is run_until_complete function in run()