ข้ามไปยังเนื้อหา
TH
รับคีย์ API
เรียกดูเอกสาร

คู่มือ

สร้างกระบวนการส่งมอบสื่อ

ดาวน์โหลด MP4 ไปยังส่วนส่วนตัว S3 เก็บแฟ้ม, ทําการเริ่มการทํางานใหม่หลังจากเริ่มโปรแกรมใหม่อีกครั้ง และให้สิทธิ์ในการใช้งานแฟ้มตรวจสอบสิทธิ์ของคุณ

ในหน้านี้

สิ่ง ที่ คุณ จะ สร้าง

รายการแบบคงทนหนึ่งรายการย้ายจากวิดีโอ ID ไปเป็นแฟ้มที่เตรียมโปรแกรมแล้ว เก็บแต่ละขั้นตอนบนดิสก์เพื่อให้กระบวนการใหม่ สามารถดําเนินการต่อจากผลที่ได้รับการยืนยันล่าสุด

บันทึกและบันทึกทางท่อName
item.json
  ○ ส่งเมื่อบันทึกการทํางาน + งาน ID
  ○ กลับ มา ทํา งาน ได้ อีก delivery.json
  ○ ตรวจ สอบ S3 ไบต์ media.mp4 + ready.json
  ○ ใช้งานโปรแกรมแบบ Office (in อังกฤษ) แบบอายุสั้น URL

ก่อนจะเริ่ม

เลือกเส้นทางหนึ่งตัวอย่างทั้งหกขั้น ทั้งคู่ใช้การติดตั้ง FlashData CLI ด้วยโพรไฟล์เจ้าของที่บันทึกไว้ youtube_download อนุญาต, ส่วนตัว S3 storage.json สําหรับการอัปโหลด และการแสดงตัวของ AWS ที่สามารถอ่านวัตถุได้

ใช้ Python 3.10# ในตัวเธอ # Python สิ่งแวดล้อม สคริปต์เรียก CLI เพื่อรักษาบันทึกการทํางาน และโบโต3ที่จะอ่าน S3 และสัญลักษณ์เชื่อมโยง Bash, jq, Node.js และ AWS CLI ไม่จําเป็นหรอก ประมวลผลคําสั่งด้านล่างนี้ด้วย python หรือ pythaon3 ถ้านั่นคือชื่อล่ามของคุณ

ติดตั้ง Python การติดต่อ
python --version
flashdata --version
python -m pip install boto3

บันทึกค่าเวลาทํางาน

สร้างโฟลเดอร์ส่วนตัวที่อยู่นอกการควบคุมแหล่ง บันทึกการตั้งค่าสําหรับพาธที่คุณเลือกไว้ และแก้ไขพาธและโพรไฟล์ได้ที่นี่ แต่ละโพรเซสจะใช้บัญชีผู้ใช้ที่บันทึกไว้ และประมวลผลบันทึกประจําวัน เก็บข้อมูลส่วนตัวใน storage.json ประมวลผล 1 รายการต่อรายการทีละครั้ง

บันทึก pipeline.json เปิด Windowsส่งต่อเส้นทางเช่น C:/private/flashdata-state ทํางานใน JSON.

pipeline.json
{
  "stateDir": "/absolute/path/to/flashdata-state",
  "storageConfig": "/absolute/path/to/private/storage.json",
  "profile": "default"
}

1. บันทึกรายการที่ทนทานหนึ่งรายการ

บันทึก item.json ในโฟลเดอร์นั่น แทนที่วิดีโอและ S3 ปลายทาง; ตัวอย่างนี้เรียกร้องให้หนึ่ง MP4 ที่ถึง 720p. เก็บไว้เถอะ runId เพื่อการบูรณะ การแสดงผลรูปแบบต่าง ๆ ต้องการรายการใหม่ runId และวัตถุนําหน้า

item.json
{
  "runId": "media:clip-001:720p:v1",
  "request": {
    "source": "youtube_download",
    "video_id": "jNQXAC9IVRw",
    "params": {
      "download_type": "audio_video",
      "video_quality": "<=720",
      "output_format": "mp4"
    }
  },
  "destination": {
    "bucket": "your-media-bucket",
    "region": "us-east-1",
    "prefix": "media/clip-001-v1"
  }
}

2. บันทึกสคริปต์และตรวจสอบสิทธิ์ที่อนุญาต

สร้างแฟ้มด้านล่างนี้ก่อนที่จะทําการตรวจสอบ มันตรวจสอบปลายทาง S3 และเก็บใบเสร็จสําหรับทุกความพยายามที่ยอมจํานน

สร้างสคริปต์สําหรับส่งเอกสาร

สร้าง pipeline.py ในโฟลเดอร์เดียวกันกับ pipeline.json ถึง item.json. คัดลอกรหัสที่สมบูรณ์ด้านล่างเข้าไปในไฟล์ที่และบันทึกมัน คุณจะทําซ้ําอีกครั้งสําหรับการตรวจสอบ, การส่งและกู้คืนในขั้นตอน 2–4

pipeline.py
# pipeline.py — Python 3.10+ and the FlashData CLI on PATH.
import argparse
import json
import os
import subprocess
import sys
import tempfile
from pathlib import Path

ROOT = Path(__file__).resolve().parent


def read_json(path):
    return json.loads(Path(path).read_text(encoding='utf-8-sig'))


def delivery_directory():
    # Recovery updates this pointer only after the delivery is saved successfully.
    return ROOT / (ROOT / 'delivery-dir.txt').read_text(encoding='utf-8').strip()


def main(action):
    os.umask(0o077)
    settings = read_json(ROOT / 'pipeline.json')
    for name in ['stateDir', 'storageConfig']:
        if not Path(settings[name]).is_absolute():
            raise ValueError('Set an absolute path for ' + name)
    item = read_json(ROOT / 'item.json')
    run_id = item['runId']
    env = dict(os.environ)
    env.pop('FLASHDATA_API_KEY', None)  # Reuse the saved owner profile.
    flags = ['--profile', settings['profile'], '--state-dir', settings['stateDir'],
             '--json', '--non-interactive']

    def cli(*args, payload=None, attempt=None):
        result = subprocess.run(['flashdata', *args, *flags], cwd=ROOT, env=env,
                                input=json.dumps(payload) if payload is not None else None,
                                capture_output=True, text=True, encoding='utf-8')
        if attempt:
            (attempt / 'receipt.json').write_text(result.stdout, encoding='utf-8')
            (attempt / 'error.json').write_text(result.stderr, encoding='utf-8')
        if result.returncode:
            if attempt:
                raise RuntimeError('Keep ' + str(attempt) + '; inspect its error and saved run.')
            raise RuntimeError(result.stderr.strip() or 'FlashData command failed.')
        response = json.loads(result.stdout)
        if not response.get('ok'):
            raise RuntimeError('Inspect the CLI response before continuing.')
        return response

    def new_attempt(stage):
        attempts = ROOT / 'attempts'
        attempts.mkdir(exist_ok=True)
        return Path(tempfile.mkdtemp(prefix=stage + '.', dir=attempts))

    if action == 'check':
        access = cli('auth', 'status')['data']
        identity = access['identity']
        if (not access.get('accessVerified')
                or identity['identity'].get('recurringAllowed') is not True
                or 'youtube_download' not in identity.get('permittedSources', [])):
            raise ValueError('Owner access with youtube_download is required.')
        print(json.dumps({'accountId': identity['identity']['accountId'],
                          'permittedSources': identity['permittedSources']}, indent=2))
        for args in [('account', 'balance'),
                     ('account', 'pricing', '--source', 'youtube_download', '--request-count', '1'),
                     ('account', 'limits')]:
            print(json.dumps(cli(*args)['data'], indent=2))
    elif action in ['dry-run', 'submit']:
        storage = read_json(settings['storageConfig'])
        destination = item['destination']
        if (item['request']['source'] != 'youtube_download'
                or storage.get('storage_type') != 's3'
                or storage.get('storage_url') != destination['bucket']
                or storage.get('region') != destination['region']):
            raise ValueError('Check item.json and the S3 destination in storage.json.')
        request = item['request']
        request['params']['storage'] = {**storage, 'object_prefix': destination['prefix']}
        args = ['query', '--input', '-', '--mode', 'async', '--run-id', run_id]
        if action == 'dry-run':
            response = cli(*args, '--dry-run', payload=request)
            if response['data'].get('dryRun') is not True:
                raise ValueError('Expected a dry-run result.')
            print(json.dumps({'ok': True, 'dryRun': True}))
        else:
            attempt = new_attempt('submit')
            response = cli(*args, '--output', str(attempt / 'submission.json'),
                           payload=request, attempt=attempt)
            print(json.dumps({'runId': run_id, 'cached': response.get('cached'),
                              'receipt': str(attempt / 'submission.json')}, indent=2))
    elif action == 'inspect':
        run = cli('runs', 'show', run_id)['data']
        print(json.dumps({'runId': run_id, 'status': run['status'], 'jobId': run.get('remoteId'),
                          'errorCode': run.get('errorCode'),
                          'candidateJobIds': run.get('candidateRemoteIds')}, indent=2))
    elif action == 'recover':
        attempt = new_attempt('recover')
        cli('runs', 'recover', run_id, '--timeout', '10m',
            '--output', str(attempt / 'delivery.json'), attempt=attempt)
        run = cli('runs', 'show', run_id)
        (attempt / 'run.json').write_text(json.dumps(run, indent=2), encoding='utf-8')
        delivery = read_json(attempt / 'delivery.json')
        if delivery.get('source') != 'youtube_download' or delivery.get('status') != 'done':
            raise ValueError('Inspect the saved delivery before verifying.')
        pointer = ROOT / 'delivery-dir.next'
        pointer.write_text(attempt.relative_to(ROOT).as_posix(), encoding='utf-8')
        pointer.replace(ROOT / 'delivery-dir.txt')
        print('Delivery files:', attempt)
    elif action == 'delivery':
        delivery = read_json(delivery_directory() / 'delivery.json')
        print(json.dumps({'status': delivery['status'], 'file': delivery['results'][0],
                          'usage': delivery.get('usage')}, indent=2))


if __name__ == '__main__':
    sys.stdout.reconfigure(encoding='utf-8')
    sys.stderr.reconfigure(encoding='utf-8')
    parser = argparse.ArgumentParser()
    parser.add_argument('action', choices=['check', 'dry-run', 'submit', 'inspect', 'recover', 'delivery'])
    try:
        main(parser.parse_args().action)
    except (OSError, ValueError, KeyError, RuntimeError) as error:
        print(str(error), file=sys.stderr)
        sys.exit(1)

โปรดตรวจสอบบัญชีผู้ใช้ที่บันทึกไว้ของคุณ

เรียกใช้การตรวจสอบนี้ฟรีจากโฟลเดอร์รายการ หลังจากที่บันทึกสคริปต์แล้ว สิทธิ์ในการเป็นเจ้าของที่สูญหาย หรือสิทธิ์ youtube_download ที่จะหยุดการตรวจสอบ ยืนยันบัญชี ID, สมดุลต่อ TB rate และลิมิต ค่าใช้จ่ายสุดท้ายขึ้นอยู่กับการอัพโหลดไบท์

ตรวจสอบสภาพแวดล้อมและบัญชีผู้ใช้
python pipeline.py check

ตรวจสอบความถูกต้องโดยไม่มีการดาวน์โหลด

หลัง จาก ช่วย ผู้ ช่วย แล้ว ก็ รีบ วิ่ง ไป. Python การพิมพ์ ok: true ถึง dryRun: true; Bash การพิมพ์ true. นี้จะตรวจสอบการป้อนข้อมูลและการเข้าถึงโดยไม่ต้องรับงานสื่อ หรือเครดิตที่ยึดเหนี่ยว

ประมวลผลแห้งว่าง
python pipeline.py dry-run

3. ส่งและรักษางาน ID

นี้ส่งหนึ่งดาวน์โหลดพื้นหลังที่จ่าย คาด status: accepted และ jobId ในงานท้องถิ่น คงโพรไฟล์, ไดเร็กทอรีสถานะและ item.json เพื่อการฟื้นตัว สื่อพร้อมใช้งานเมื่อจบขั้นตอน 5 แล้ว

ส่งข้อมูลหนึ่งครั้ง
python pipeline.py submit
จําแนกสถานะท้องถิ่น
python pipeline.py inspect

หากมีการบันทึกการทํางานหรือไม่แน่ใจอยู่แล้ว

CLI สถานะการกระทํา
accepted + jobIdเรียกคืนการทํางานนี้ในขั้นตอน 4 ให้งาน ID หากโพรเซสยุติการทํางาน
succeededRecover/export การตอบรับที่บันทึกไว้ จากนั้นตรวจสอบการจัดเก็บ ไม่ต้องส่งรายการใหม่
ไม่ทราบผลลัพธ์ / ไม่มีงานพิมพ์ที่ได้รับการยืนยัน IDให้ทํางาน ใบเสร็จและความผิดพลาด ขอบเขตสี History หรือผู้สมัคร IDs ก่อนที่จะตัดสินใจรับอีก

4. ดึงข้อมูลบันทึกการส่งมอบ

ประมวลผลจากโฟลเดอร์ในเทอร์มินัลใหม่ใด ๆ การ กู้ คืน สู่ สภาพ เดิม คอย งาน เดิม และ ทํา การ พิมพ์ ไดเรกทอรี ที่ บรรจุ อยู่ delivery.json, run.json และใบเสร็จ A 10- ขอเวลาหนึ่งนาที หยุดการรอคอยในท้องถิ่น; ทําซ้ําการฟื้นตัวเพื่อกลับมาทํางานเดิม

ทํางานที่บันทึกไว้ต่อ

ใช้อีกครั้ง pipeline.py บันทึกในขั้นตอน 2. ไม่จําเป็นต้องมีสคริปต์เพิ่มเติม

เรียกคืนงานที่มีอยู่แล้ว ไม่มีการส่งข้อมูลใหม่
python pipeline.py recover

ตรวจหาวัตถุที่ส่งมาแล้ว

ผลลัพธ์ควรมี URL ของออบเจ็กต์ S3 หนึ่งรายการ ขนาดไฟล์มากกว่าศูนย์ และ MD5 ออบเจ็กต์ส่วนตัวต้องใช้ข้อมูลรับรอง AWS ที่มีสิทธิ์อ่าน Python บันทึกไดเรกทอรีที่สำเร็จไว้ใน delivery-dir.txt สำหรับสคริปต์ถัดไป ส่วน Bash เก็บไว้ใน DELIVERY_DIR หากเปิดเทอร์มินัลใหม่ ให้ตั้งค่านี้เป็นไดเรกทอรีที่แสดงไว้

บันทึกการส่งมอบ
python pipeline.py delivery

5. ตรวจสอบไบต์ก่อนที่จะทําการทําการพิมพ์เสร็จ

เครื่องตรวจสอบค่านําเข้าดั้งเดิม S3 ถังและคํานําหน้า, ลําธารวัตถุเอกชนกับดิสก์และการเปรียบเทียบโดยนับ MD5. ผลิตแฟ้มที่เข้าคู่กันเท่านั้น verified/ready.json. Python อ่าน delivery-dir.txt; โหนดใช้ DELIVERY_DIR และทั้งยังไม่ส่ง FlashData สอบถามดู

บันทึกสคริปต์ตรวจสอบ

ส่วนเสริมนี้ใช้จับมาตรฐาน Amazon S3 วัตถุ URLs. สําหรับผู้จัดทําหรือผู้ให้บริการอื่น ๆ ที่กําหนดเอง ให้ใช้อ่านวัตถุที่ยืนยันแล้ว และคงปลายทางเดิม โดยเพิ่มจํานวนและตรวจเช็ค

สร้าง verify-media.py ข้าง pipeline.py และคัดลอกรหัสที่สมบูรณ์ ลงในมัน จัดเก็บแฟ้มทั้งสองไว้ในโฟลเดอร์รายการ

verify-media.py
# verify-media.py — uses Boto3's configured AWS read identity.
import hashlib
import json
import os
import re
import sys
from contextlib import closing
from datetime import datetime, timezone
from urllib.parse import unquote, urlsplit

import boto3
from pipeline import ROOT, delivery_directory, read_json


def main():
    os.umask(0o077)
    directory = delivery_directory()
    item = read_json(ROOT / 'item.json')
    saved = read_json(directory / 'run.json')
    raw = (directory / 'delivery.json').read_bytes()
    delivery = json.loads(raw)
    run = saved.get('data', {})
    if (not saved.get('ok') or run.get('id') != item['runId']
            or run.get('status') != 'succeeded' or not run.get('remoteId')
            or delivery.get('source') != 'youtube_download' or delivery.get('status') != 'done'
            or not isinstance(delivery.get('results'), list) or len(delivery['results']) != 1):
        raise ValueError('Inspect the saved run and completed delivery before verifying.')
    file = delivery['results'][0]
    bucket, region, prefix = (item['destination'][key] for key in ['bucket', 'region', 'prefix'])
    original = run.get('input', {})
    storage = original.get('params', {}).get('storage', {})
    if (original.get('source') != 'youtube_download' or original.get('video_id') != item['request']['video_id']
            or any(original.get('params', {}).get(key) != item['request']['params'][key]
                   for key in ['download_type', 'video_quality', 'output_format'])
            or storage.get('storage_url') != bucket or storage.get('region') != region
            or storage.get('object_prefix') != prefix):
        raise ValueError('item.json changed after submission. Inspect the original run.')
    url = urlsplit(file['file_url'])
    hosts = [bucket + '.s3.' + region + '.amazonaws.com', bucket + '.s3.amazonaws.com']
    key = unquote(url.path[1:], errors='strict')
    if (url.scheme != 'https' or url.netloc not in hosts or url.query or url.fragment
            or not prefix or not key.startswith(prefix + '/')):
        raise ValueError('The delivery does not match the planned Amazon S3 destination.')
    if (type(file.get('file_size')) is not int or file['file_size'] <= 0
            or not re.fullmatch(r'[a-fA-F0-9]{32}', file.get('md5', ''))):
        raise ValueError('A positive file_size and MD5 are required. Keep the manifest.')
    verification = directory / 'verified'
    verification.mkdir(mode=0o700)  # Stop if an earlier verification already exists.
    local_file = verification / 'media.mp4'
    s3 = boto3.client('s3', region_name=region)
    response = s3.get_object(Bucket=bucket, Key=key)
    size, digest = 0, hashlib.md5(usedforsecurity=False)
    with closing(response['Body']) as stream, local_file.open('xb') as output:
        while chunk := stream.read(1024 * 1024):
            output.write(chunk)
            size += len(chunk)
            digest.update(chunk)
    md5 = digest.hexdigest()
    if size != file['file_size'] or md5 != file['md5'].lower():
        raise ValueError('Byte count or MD5 mismatch. Keep the file; do not mark it ready.')
    ready = {'runId': item['runId'], 'jobId': run['remoteId'], 'videoId': item['request']['video_id'],
             'bucket': bucket, 'region': region, 'objectKey': key,
             'storageVersionId': response.get('VersionId'), 'bytes': size, 'md5': md5,
             'verifiedAt': datetime.now(timezone.utc).isoformat(), 'localFile': str(local_file.resolve()),
             'deliverySha256': hashlib.sha256(raw).hexdigest(), 'usage': delivery.get('usage')}
    with (verification / 'ready.json').open('x', encoding='utf-8') as output:
        json.dump(ready, output, indent=2)
    print('Delivery verified:', verification / 'ready.json')
    print(json.dumps(ready, indent=2))


if __name__ == '__main__':
    sys.stdout.reconfigure(encoding='utf-8')
    sys.stderr.reconfigure(encoding='utf-8')
    try:
        main()
    except Exception as error:
        print(str(error), file=sys.stderr)
        sys.exit(1)

ประมวลผลตรวจสอบ

หลังจากบันทึกสคริปต์แล้ว ให้ประมวลผลมันจากโฟลเดอร์รายการ

ตรวจ และ อ่าน ประวัติการ ออก มือ
python verify-media.py

เอามือออก ready.json ไปยังโปรแกรมของคุณ

คาดว่าจะมีการตรวจสอบการส่งมอบและบันทึกที่บรรจุ run/job IDsตะกร้า, พื้นที่, กุญแจวัตถุ, ขนาดตรวจสอบและ MD5. นี่ เป็น ประวัติ บันทึก ของ คุณ ที่ สร้าง โดย สคริปต์. จัดเก็บลงแฟ้ม delivery.json และ (เราได้ทําให้) บรรดาสิ่งดี ๆ จากกิตติคุณ มันจะยังคงเหลืออยู่ API ผล ก็ คือ มี การ ใช้ หน้าต่าง สํารอง.

สําหรับตรวจสอบ, การทําดัชนีหรือการประมวลผลอื่น ๆ ผ่านการตรวจสอบ localFile กับพนักงานของคุณ สําหรับการดาวน์โหลดผู้ใช้ โดยทําต่อด้วย 6

6. ให้สิทธิ์ในการใช้งานโปรแกรมของคุณ

ใน แบ็คเอนต์ ของ คุณ ให้ มอบ อํานาจ ผู้ ใช้ และ ค้น ดู บันทึก ที่ ผู้ ใช้ ได้ ทํา ไว้ ใน ร้าน ของ คุณ เอง. จากนั้นให้อายุยืน S3 ดาวน์โหลด URL. ใช้ปลายทางที่บันทึกไว้; ไม่ต้องรับถังหรือปุ่มออบเจกต์ที่จัดให้โดยเบราว์เซอร์

The SDK ใช้ชื่ออ่านของโปรแกรมเบื้องหลัง AWS. ไม่ FlashData การสอบถามถูกส่งไปแล้ว

เดอะ URL ชื่อรุ่นของออบเจกต์ที่ตรวจสอบแล้วเมื่อ S3 การทําซ้ําทําให้ได้อย่างหนึ่ง โดยไม่ต้องมีรุ่น ID ให้เก็บแต่ละปุ่มพิมพ์ที่จะส่งออกหลังจากการตรวจสอบ การอ่านการแสดงตัวต้องการรุ่น s3: GetObjectVersion; การอ่านแบบไม่ซ้ําหน้าต้องการ S3: greopObjject

สร้าง create-download-link.py ข้าง pipeline.py และคัดลอกรหัสที่สมบูรณ์ ลงในมัน มันใช้แพกเกจ Boto3 ที่ติดตั้งไว้ในตอนแรก

create-download-link.py
# create-download-link.py — run in your backend after authorizing the user.
import json
import os
import sys

import boto3
from botocore.config import Config
from pipeline import delivery_directory, read_json


def main():
    os.umask(0o077)
    # In an app, load this user's verified ready record from your own store.
    directory = delivery_directory() / 'verified'
    ready = read_json(directory / 'ready.json')
    if any(not isinstance(ready.get(key), str) or not ready[key]
           for key in ['bucket', 'region', 'objectKey', 'verifiedAt']):
        raise ValueError('Use the ready.json produced by the verification step.')
    destination = directory / 'access.json'
    if destination.exists():
        raise FileExistsError('Keep the existing access.json or choose a new output filename.')
    params = {'Bucket': ready['bucket'], 'Key': ready['objectKey']}
    version = ready.get('storageVersionId')
    if version and version != 'null':
        params['VersionId'] = version
    s3 = boto3.client('s3', region_name=ready['region'], config=Config(signature_version='s3v4'))
    url = s3.generate_presigned_url('get_object', Params=params, ExpiresIn=300, HttpMethod='GET')
    with destination.open('x', encoding='utf-8') as output:
        json.dump({'url': url, 'expiresInSeconds': 300}, output, indent=2)
    # Do not log the signed URL; return it only to the authorized user.
    print('Access record saved:', destination)


if __name__ == '__main__':
    sys.stdout.reconfigure(encoding='utf-8')
    sys.stderr.reconfigure(encoding='utf-8')
    try:
        main()
    except Exception as error:
        print(str(error), file=sys.stderr)
        sys.exit(1)

คาดหวังว่าจะเป็นเรื่องส่วนตัว access.json บรรจุ url และ expiresInSeconds: 300. แบ็คเอนต์ของคุณจะคืนเฉพาะแฟ้มเท่านั้น URL ไปยังผู้ใช้ที่ได้รับอนุญาต ใครก็ตามที่ถือมันสามารถดาวน์โหลดไฟล์ได้ถึงห้านาที มันอาจจะหมดอายุเร็วขึ้นด้วยเอกสารรับรองการลงนาม

สร้างการเชื่อมโยงใหม่จากบันทึกที่บันทึกไว้แล้ว เมื่อผู้ใช้ต้องการเข้าใช้งานครั้งต่อไป เก็บกุญแจออบเจกต์และรุ่นไว้ในฐานข้อมูลของคุณ แทนการเก็บค่าที่ตั้งของ URL ไว้ ตัวอย่างนี้ภายในเครื่องหยุดการทํางานหาก access.json มีอยู่แล้ว

สร้างการเชื่อมโยงห้านาที
python create-download-link.py

เริ่มต้นจากขั้นสุดท้ายที่ได้รับการยืนยัน

สถานการณ์การกระทําถัดไป
รับงาน / รอเล่นท้องถิ่นทําซ้ํา runs recover เหมือนกัน runId เข้าสู่ไดเร็กทอรีใหม่
S3 การเข้าถึงถูกปฏิเสธหรือขัดจังหวะการอ่านแก้ไขการแสดงตัวหรือการเชื่อมต่อของ AWS เรียกคืนไปยังไดเรกทอรีใหม่และตรวจสอบอีกครั้ง โปรดเก็บส่วนย่อยก่อน
จํานวนไบต์ / MD5 / ปลายทางไม่ตรงกันหยุด เปรียบเทียบรุ่นที่แสดง, ออบเจ็กต์ และวางแผนปลายทาง ก่อนที่จะใช้สื่อ
มีการตรวจสอบสิทธิ์/ มีอยู่แล้วอ่าน ready.json ของมัน หรือตรวจสอบการตรวจสอบไม่สมบูรณ์ สคริปต์จะไม่เขียนทับมัน
ดาวน์โหลดโปรแกรม URL หมดอายุอนุญาตให้เข้าใช้อีกครั้งและเซ็นบันทึก object/version. ไม่ต้องส่งการดาวน์โหลด FlashData อีก
run_id_input_conflictคํา ขอ นั้น ได้ เปลี่ยน ไป. กู้ค่าเดิมที่ประมวลผล; ใช้ใหม่ runId เพื่อผลลัพธ์ใหม่โดยเจตนาเท่านั้น
401 / 403 / 402 / 429ปรับแก้สิทธิ์ในการใช้งานหรือสมดุลย์ของ KDE Retry-After. จําแนกงานก่อนที่จะพยายามส่งอีกครั้ง

ปรับใช้ระยะเดียวกันกับคิว

  1. เริ่มด้วยรายการไฟอินฟลาย อ่านลิมิตในปัจจุบันก่อนที่จะเพิ่มความสอดคล้องของโปรแกรม
  2. จง ยืน หยัด ต่อ ๆ ไป runId สําหรับแต่ละคน video/output รุ่นที่มีสัญลักษณ์พิเศษสําหรับปลายทางที่แตกต่างกัน เก็บบัญชี, งาน ID และผลสุดท้ายในฐานข้อมูลโปรแกรมของคุณ
  3. ต่อเนื่อง CLI ไดเร็กทอรีสถานะที่อยู่ตรงข้ามโพรเซสเริ่มการทํางานใหม่ การแยกเครื่องจักรต้องการการประสานงานของโปรแกรมร่วมกัน ซึ่งบันทึกประจําวันท้องถิ่นไม่ได้ลดความซับซ้อนของไดเรกทอรีของรัฐ
  4. ใช้ ready.json เหมือนการส่งเรือลงแม่น้ํา การ นํา ของ ที่ ไม่ ได้ ทํา สําเร็จ แต่ ละ ชิ้น มา ใช้ ใหม่ ได้ อย่าง ประสบ ผล สําเร็จ.