Skip to content

Commit

Permalink
fix: executor rpc examples
Browse files Browse the repository at this point in the history
  • Loading branch information
morgsmccauley committed Jul 17, 2024
1 parent 90d906c commit 33ba8e7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions runner/examples/list-executors.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Run with 'npx ts-node src/test-client.ts'

import runnerClient from '../src/server/runner-client';
import runnerClient from '../src/server/services/runner/runner-client';

void (async function main () {
runnerClient.ListExecutors({}, (err, response) => {
if (err) {
console.error('List request error: ', err);
} else {
console.log('Successful ListExecutors request: ', response);
console.log('list response: ', JSON.stringify({ response }, null, 2));
}
});
})();
6 changes: 3 additions & 3 deletions runner/examples/start-executor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Run with 'npx ts-node src/test-client.ts'

import runnerClient from '../src/server/runner-client';
import runnerClient from '../src/server/services/runner/runner-client';

const schema = `
CREATE TABLE
Expand All @@ -13,7 +13,7 @@ CREATE TABLE
`;

const code = `
console.log("hello");
// do nothing
`;

const indexer = {
Expand All @@ -35,7 +35,7 @@ void (async function main () {
if (err) {
console.error('error: ', err);
} else {
console.log('start request: ', response);
console.log('start response: ', JSON.stringify({ response }, null, 2));
}
});
})();
6 changes: 3 additions & 3 deletions runner/examples/stop-executor.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Run with 'npx ts-node src/test-client.ts'

import runnerClient from '../src/server/runner-client';
import runnerClient from '../src/server/services/runner/runner-client';

runnerClient.StopExecutor({
executorId: 'SOME_EXECUTOR_ID'
executorId: '0293a6b1dcd2259a8be6b59a8cd3e7b4285e540a64a7cbe99639947f7b7e2f9a'
}, (err, response) => {
if (err) {
console.error('error: ', err);
} else {
console.log('stop request: ', response);
console.log('stop request: ', JSON.stringify({ response }, null, 2));
}
});

0 comments on commit 33ba8e7

Please sign in to comment.