pr-curve.ts 527 字节
Newer Older
P
Peter Pan 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
import type {Worker} from './types';

const worker: Worker = async io => {
    const components = await io.getData<string[]>('/components');
    if (!components.includes('pr_curve')) {
        return;
    }

    const tagsMap = await io.save<Record<string, string[]>>('/pr-curve/tags');
    for (const [run, tags] of Object.entries(tagsMap)) {
        await io.save('/pr-curve/steps', {run});
        for (const tag of tags) {
            await io.save('/pr-curve/list', {run, tag});
        }
    }
};

export default worker;