コード例 #1
0
ファイル: cron.py プロジェクト: pazthor/osf.io
def schedule_osf_storage(cron):
    for idx in range(N_AUDIT_WORKERS):
        audit = ensure_item(
            cron,
            cd_app(
                tasks.bin_prefix(
                    'python -m scripts.osfstorage.files_audit {0} {1}'.format(
                        N_AUDIT_WORKERS,
                        idx,
                    ))))
        audit.dow.on(0)  # Sunday
        audit.hour.on(2)  # 2 a.m.
コード例 #2
0
ファイル: cron.py プロジェクト: pazthor/osf.io
def schedule_glacier(cron):
    glacier_inventory = ensure_item(
        cron,
        cd_app(
            tasks.bin_prefix(
                'python -m scripts.osfstorage.glacier_inventory')))
    glacier_inventory.dow.on(0)  # Sunday
    glacier_inventory.hour.on(0)  # 12 a.m.

    glacier_audit = ensure_item(
        cron, run_python_script('python -m scripts.osfstorage.glacier_audit'))
    glacier_audit.dow.on(0)  # Sunday
    glacier_audit.hour.on(6)  # 6 a.m.
コード例 #3
0
ファイル: cron.py プロジェクト: KerryKDiehl/osf.io
def schedule_osf_storage(cron):
    for idx in range(N_AUDIT_WORKERS):
        audit = ensure_item(
            cron,
            cd_app(
                tasks.bin_prefix(
                    'python -m scripts.osfstorage.files_audit {0} {1}'.format(
                        N_AUDIT_WORKERS,
                        idx,
                    )
                )
            )
        )
        audit.dow.on(0)     # Sunday
        audit.hour.on(2)    # 2 a.m.
コード例 #4
0
ファイル: cron.py プロジェクト: KerryKDiehl/osf.io
def schedule_glacier(cron):
    glacier_inventory = ensure_item(
        cron,
        cd_app(
            tasks.bin_prefix(
                'python -m scripts.osfstorage.glacier_inventory'
            )
        )
    )
    glacier_inventory.dow.on(0)     # Sunday
    glacier_inventory.hour.on(0)    # 12 a.m.

    glacier_audit = ensure_item(
        cron,
        run_python_script(
            'python -m scripts.osfstorage.glacier_audit'
        )
    )
    glacier_audit.dow.on(0)         # Sunday
    glacier_audit.hour.on(6)        # 6 a.m.