georgia-tech-db / evadb

Database system for AI-powered apps
https://evadb.ai/docs
Apache License 2.0
2.64k stars 262 forks source link

Job scheduler run flag #1407

Open kompy99 opened 12 months ago

kompy99 commented 12 months ago

Configured job scheduler to run based on a configuration.

Job scheduler is initialized during: 1) EvaDB Server mode - During server startup 2) Python package mode - During init of first connection object

The job scheduler process polls the "jobs" DB configuration to determine whether to execute background jobs.

This way, the job scheduler can be enabled and disabled via SQL commands using the SET statement.

Usage

Enable scheduler

SET jobs = "True"

Disable scheduler

SET jobs = "False"

The jobs configuration is set to "False" by default so there is no change in existing behaviour of the scheduler.