pinger_bot.ext.scheduling#

Module for scheduled jobs.

Module Contents#

Functions#

collect_info_for_statistic(→ None)

Collect info for statistic plot.

handle_server(→ None)

One interaction for the servers in database.

delete_old_pings(→ None)

Delete old pings, this means older than ~26 hours.

load(→ None)

Placeholder for the lightbulb's plugin system, so this file will be loaded.

Attributes#

scheduler[source]#
async collect_info_for_statistic() None[source]#

Collect info for statistic plot.

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_serverpinger_bot.models.Server object.

  • sessionsqlalchemy.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:

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