0

データベースのダンプを自動化しようとしていますが、スクリプトのように機能します

sched = Scheduler()

@sched.cron_schedule(day_of_week='mon-fri', hour=13)
def dump():
    '''Dumps database with predefined data'''
    user = 'root'
    password = 'root'
    host = 'localhost'
    database = 'root_db'


    filestamp = time.strftime('%Y-%m-%d-%I:%M')
    os.popen("mysqldump -u %s -p%s -h %s -e --opt -c %s | gzip -c > %s.gz" % (user, password, host, database, database + "_" + filestamp))

    print "\n-- please have a the dump file in " + database + "_" + filestamp + ".gz --"


if __name__ == "__main__":
    sched.start()
    while True:
        pass

また、コンピューターにハイパースレッディングのない 4 つのコアがあり、Tornado の 4 つのインスタンスをデプロイしました。私の質問は、上記のスクリプトを開始すると、自分用に1つのプロセッサが必要になりますか?

4

1 に答える 1