Esempio n. 1
0
    def __init__(self):
        self.log = logging.getLogger("Main.VpsScheduler")

        self.interface = salt_runner.VpsHerder()

        self.sched = BlockingScheduler({
            'apscheduler.job_defaults.coalesce': 'true',
            'apscheduler.timezone': 'UTC',
        })

        self.sched.add_job(self.ensure_active_workers, 'interval', seconds=60)
        self.install_destroyer_jobs()
Esempio n. 2
0
    def __init__(self):
        self.log = logging.getLogger("Main.VpsScheduler")

        self.interface = salt_runner.VpsHerder()

        self.sched = BlockingScheduler({
            'apscheduler.job_defaults.coalesce': 'true',
            'apscheduler.timezone': 'UTC',
        })

        self.stats_con = statsd.StatsClient(
            host=settings.GRAPHITE_DB_IP,
            port=8125,
            prefix='ReadableWebProxy.VpsHerder',
        )

        self.sched.add_job(poke_statsd, 'interval', seconds=60)
        self.sched.add_job(self.ensure_active_workers,
                           'interval',
                           seconds=60 * 5)
        self.install_destroyer_jobs()
Esempio n. 3
0
def poke_statsd():
    interface = salt_runner.VpsHerder()
    interface.list_nodes()