Skip to content

Commit

Permalink
Remove debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
tmathern committed Nov 28, 2023
1 parent 080c686 commit ead1460
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 42 deletions.
11 changes: 4 additions & 7 deletions lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function batchWorker(renditionsCallback, options = {}) {
}


function shellScriptWorker(script = "worker.sh", options = {}) {
function shellScriptWorker(script = "worker.sh", options = {}, catalog) {
ShellScriptWorker.validate(script);
options.script = script;

Expand All @@ -102,13 +102,10 @@ function shellScriptWorker(script = "worker.sh", options = {}) {

options.isShellscriptWorker = true;
options.params = params;
options.transformerCatalog = process.env.ASSET_COMPUTE_SENSEI_CATALOG;
if(process.env.ASSET_COMPUTE_SENSEI_CATALOG) {
options.transformerCatalog = process.env.ASSET_COMPUTE_SENSEI_CATALOG;
}

console.log('~~~~~~~~~~~~~~~ options')
console.log('~~~~~~~~~~~~~~~ ')
console.log(options)
console.log('~~~~~~~~~~~~~~~ ')
console.log('~~~~~~~~~~~~~~~ ')
return new AssetComputeWorkerPipeline(options.script, options).compute(params);
} else {
console.log("Using shellscript worker callback (`ShellScriptWorker`)");
Expand Down
33 changes: 0 additions & 33 deletions lib/shellscript-worker-transformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,39 +30,6 @@ class ShellscriptCallbackTransformer extends Transformer {
}

async compute(input, output) {
// console.log("")
// console.log("")
// console.log("")
// console.log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
// console.log("Callback: ")
// console.log(this._callback);
// console.log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
// console.log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
// console.log("Input params for transformer: ")
// console.log(input);
// console.log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
// console.log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
// console.log("Output params for transformer: ")
// console.log(output);
// // output.rendition.directory is where we need to move the rendition
// console.log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
// console.log("")
// console.log("")
// console.log("")

// Debug code to check presence of needed files:
// console.log("");
// console.log("");
// console.log(`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Files available in ${__dirname}/test-folder-in:`)
// const filenames = fs.readdirSync(`${__dirname}/test-folder-in`);
// console.log("\nCurrent directory filenames:");
// filenames.forEach(file => {
// console.log(file);
// });
// console.log('/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~')
// console.log("");
// console.log("");

const executionOptions = {
script: this._callback
};
Expand Down
1 change: 0 additions & 1 deletion lib/worker-pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class AssetComputeWorkerPipeline {
* @returns a list of transformers available for this pipeline instance
*/
buildTransformersFromManifests(renditionCallback) {
console.log('## Building worker from manifest');
if (!this.options.manifest) {
debug("No additional manifest in the pipeline options, no additional WorkerCallbackTransformer added to pipeline");
return this.transformers;
Expand Down
1 change: 0 additions & 1 deletion lib/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ class AssetComputeWorker {
this.timers.download.start();

if (this.params.source !== undefined && this.params.source !== null) {
console.log("Getting source...");
this.source = await Storage.getSource(
this.params.source,
this.directories.in,
Expand Down

0 comments on commit ead1460

Please sign in to comment.