Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU and GPU Workers with Classic Plugins #626

Merged
merged 3 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ jobs:
- run: npm i && npm i -g typescript && rm -rdf ./FlowPlugins && tsc -v && tsc

- uses: stefanzweifel/git-auto-commit-action@v5
if: ${{ github.event.pull_request.head.repo.full_name == 'org/repo' }}
## fix this check
if: github.event.pull_request.head.repo.full_name == github.repository
with:
commit_message: Apply auto-build changes

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
"use strict";
/* eslint-disable no-template-curly-in-string */
/* eslint-disable import/prefer-default-export */
Object.defineProperty(exports, "__esModule", { value: true });
exports.details = void 0;
var details = function () { return ({
name: 'CPU and GPU Workers with Classic Plugins',
description: 'An example of how to use CPU and GPU workers in a flow with Classic plugins.',
tags: '',
flowPlugins: [
{
name: 'Input File',
sourceRepo: 'Community',
pluginName: 'inputFile',
version: '1.0.0',
id: '7a6heYJTK',
position: {
x: 619.59375,
y: 71,
},
},
{
name: 'Check Flow Variable Worker Type',
sourceRepo: 'Community',
pluginName: 'checkFlowVariable',
version: '1.0.0',
inputsDB: {
variable: '{{{args.workerType}}}',
value: 'transcodecpu',
},
id: 'Xmz-M1Kcp',
position: {
x: 283.20237348477906,
y: 290.238450972502,
},
},
{
name: 'Run Classic Transcode Plugin GPU',
sourceRepo: 'Community',
pluginName: 'runClassicTranscodePlugin',
version: '1.0.0',
id: 'eqw2BDcZn',
position: {
x: 375.31709058623835,
y: 408.0111681805965,
},
},
{
name: 'Run Classic Transcode Plugin CPU',
sourceRepo: 'Community',
pluginName: 'runClassicTranscodePlugin',
version: '1.0.0',
inputsDB: {
pluginSourceId: 'Community:Tdarr_Plugin_MC93_Migz1FFMPEG_CPU',
},
id: 'UINSF-Jto',
position: {
x: 100.25684007589598,
y: 404.37175331560564,
},
},
{
name: 'Replace Original File',
sourceRepo: 'Community',
pluginName: 'replaceOriginalFile',
version: '1.0.0',
id: 'lxwMPh0uu',
position: {
x: 595.7808723912251,
y: 607.9004301072788,
},
},
{
name: 'Check Video Codec',
sourceRepo: 'Community',
pluginName: 'checkVideoCodec',
version: '1.0.0',
id: 'proNYXeri',
position: {
x: 619.8706093195298,
y: 156.082632021403,
},
},
{
name: 'Check if the worker is CPU or GPU',
sourceRepo: 'Community',
pluginName: 'comment',
version: '1.0.0',
id: 'AKPe0A7V8',
position: {
x: 464.26942235255467,
y: 287.4437630300136,
},
},
],
flowEdges: [
{
source: 'Xmz-M1Kcp',
sourceHandle: '1',
target: 'UINSF-Jto',
targetHandle: null,
id: 'uidvJfV-Y',
},
{
source: 'Xmz-M1Kcp',
sourceHandle: '2',
target: 'eqw2BDcZn',
targetHandle: null,
id: 'NJYk1xAp8',
},
{
source: 'proNYXeri',
sourceHandle: '2',
target: 'Xmz-M1Kcp',
targetHandle: null,
id: 'SLQVwGIPH',
},
{
source: '7a6heYJTK',
sourceHandle: '1',
target: 'proNYXeri',
targetHandle: null,
id: 'qiz1H28mJ',
},
{
source: 'proNYXeri',
sourceHandle: '1',
target: 'lxwMPh0uu',
targetHandle: null,
id: 'AqBdvBcmk',
},
{
source: 'UINSF-Jto',
sourceHandle: '1',
target: 'lxwMPh0uu',
targetHandle: null,
id: 'iwEuBiRZF',
},
{
source: 'eqw2BDcZn',
sourceHandle: '1',
target: 'lxwMPh0uu',
targetHandle: null,
id: 'WQDC5fqqR',
},
],
}); };
exports.details = details;
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
/* eslint-disable no-template-curly-in-string */
/* eslint-disable import/prefer-default-export */

import { IflowTemplate } from '../../FlowHelpers/1.0.0/interfaces/interfaces';

const details = () :IflowTemplate => ({
name: 'CPU and GPU Workers with Classic Plugins',
description: 'An example of how to use CPU and GPU workers in a flow with Classic plugins.',
tags: '',
flowPlugins: [
{
name: 'Input File',
sourceRepo: 'Community',
pluginName: 'inputFile',
version: '1.0.0',
id: '7a6heYJTK',
position: {
x: 619.59375,
y: 71,
},
},
{
name: 'Check Flow Variable Worker Type',
sourceRepo: 'Community',
pluginName: 'checkFlowVariable',
version: '1.0.0',
inputsDB: {
variable: '{{{args.workerType}}}',
value: 'transcodecpu',
},
id: 'Xmz-M1Kcp',
position: {
x: 283.20237348477906,
y: 290.238450972502,
},
},
{
name: 'Run Classic Transcode Plugin GPU',
sourceRepo: 'Community',
pluginName: 'runClassicTranscodePlugin',
version: '1.0.0',
id: 'eqw2BDcZn',
position: {
x: 375.31709058623835,
y: 408.0111681805965,
},
},
{
name: 'Run Classic Transcode Plugin CPU',
sourceRepo: 'Community',
pluginName: 'runClassicTranscodePlugin',
version: '1.0.0',
inputsDB: {
pluginSourceId: 'Community:Tdarr_Plugin_MC93_Migz1FFMPEG_CPU',
},
id: 'UINSF-Jto',
position: {
x: 100.25684007589598,
y: 404.37175331560564,
},
},
{
name: 'Replace Original File',
sourceRepo: 'Community',
pluginName: 'replaceOriginalFile',
version: '1.0.0',
id: 'lxwMPh0uu',
position: {
x: 595.7808723912251,
y: 607.9004301072788,
},
},
{
name: 'Check Video Codec',
sourceRepo: 'Community',
pluginName: 'checkVideoCodec',
version: '1.0.0',
id: 'proNYXeri',
position: {
x: 619.8706093195298,
y: 156.082632021403,
},
},
{
name: 'Check if the worker is CPU or GPU',
sourceRepo: 'Community',
pluginName: 'comment',
version: '1.0.0',
id: 'AKPe0A7V8',
position: {
x: 464.26942235255467,
y: 287.4437630300136,
},
},
],
flowEdges: [
{
source: 'Xmz-M1Kcp',
sourceHandle: '1',
target: 'UINSF-Jto',
targetHandle: null,
id: 'uidvJfV-Y',
},
{
source: 'Xmz-M1Kcp',
sourceHandle: '2',
target: 'eqw2BDcZn',
targetHandle: null,
id: 'NJYk1xAp8',
},
{
source: 'proNYXeri',
sourceHandle: '2',
target: 'Xmz-M1Kcp',
targetHandle: null,
id: 'SLQVwGIPH',
},
{
source: '7a6heYJTK',
sourceHandle: '1',
target: 'proNYXeri',
targetHandle: null,
id: 'qiz1H28mJ',
},
{
source: 'proNYXeri',
sourceHandle: '1',
target: 'lxwMPh0uu',
targetHandle: null,
id: 'AqBdvBcmk',
},
{
source: 'UINSF-Jto',
sourceHandle: '1',
target: 'lxwMPh0uu',
targetHandle: null,
id: 'iwEuBiRZF',
},
{
source: 'eqw2BDcZn',
sourceHandle: '1',
target: 'lxwMPh0uu',
targetHandle: null,
id: 'WQDC5fqqR',
},
],
});

export {
details,
};