pinger_bot.ext.scheduling#
Module for scheduled jobs.
Module Contents#
Functions#
|
Collect info for statistic plot. |
|
One interaction for the servers in database. |
|
Delete old pings, this means older than ~26 hours. |
|
Placeholder for the lightbulb's plugin system, so this file will be loaded. |
Attributes#
- async handle_server(db_server: pinger_bot.models.Server, session: sqlalchemy.ext.asyncio.AsyncSession) None[source]#
One interaction for the servers in database.
- Parameters:
db_server –
pinger_bot.models.Serverobject.session –
sqlalchemy.ext.asyncio.AsyncSession, so every online server will not open new DB session.
- async delete_old_pings(session: sqlalchemy.ext.asyncio.AsyncSession) None[source]#
Delete old pings, this means older than ~26 hours.
- Parameters:
session –
sqlalchemy.ext.asyncio.AsyncSession, so we don’t need to open it again.
- load(__: pinger_bot.bot.PingerBot) None[source]#
Placeholder for the lightbulb’s plugin system, so this file will be loaded.