execute query_database on start
This commit is contained in:
parent
a145c15b20
commit
2ec0eaf556
1 changed files with 4 additions and 2 deletions
|
@ -44,9 +44,11 @@ rec_path = "/recordings"
|
||||||
# Bot functions
|
# Bot functions
|
||||||
@bot.event
|
@bot.event
|
||||||
async def on_ready():
|
async def on_ready():
|
||||||
# Schedule a database update
|
|
||||||
scheduler.add_job(func=query_database, trigger='interval', seconds=30, id='query_database')
|
|
||||||
scheduler.start()
|
scheduler.start()
|
||||||
|
|
||||||
|
# Schedule a database update
|
||||||
|
scheduler.add_job(func=query_database, trigger='interval', seconds=30, id='query_database')
|
||||||
|
scheduler.get_job('query_database').modify(next_run_time=datetime.now())
|
||||||
logger_discord.info(scheduler.print_jobs())
|
logger_discord.info(scheduler.print_jobs())
|
||||||
|
|
||||||
@bot.command(name='hello', help='Say hello to the bot')
|
@bot.command(name='hello', help='Say hello to the bot')
|
||||||
|
|
Loading…
Add table
Reference in a new issue