Skip to content

Commit

Permalink
move logic to backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Almenon committed Jul 10, 2023
1 parent 29c5825 commit a2c78aa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
3 changes: 0 additions & 3 deletions src/PreviewManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,12 @@ export default class PreviewManager {
// basically all this does is load a file.. why does it need to be async *sob*
const env = await this.loadAndWatchEnvVars()

// start three evaluators and save them to dict by name
this.PythonEvaluator = new PythonEvaluator({
pythonOptions,
pythonPath,
env,
})

// put below two in a loop for each evaluator
try {
console.log('Starting python with path ' + pythonPath)
this.PythonEvaluator.start()
Expand Down Expand Up @@ -259,7 +257,6 @@ export default class PreviewManager {
})
this.PythonEvaluator.pyshell.childProcess.on("exit", err => {
// might need to rethink this method now that i kill arepl on purpose...
if(!err) return // normal exit
console.debug('exit handler invoked w/ ' + err)
this.previewContainer.displayProcessError(`err code: ${err}`);
this.reporter.sendError(new Error('exit'), err, 'spawn')
Expand Down
13 changes: 0 additions & 13 deletions src/toAREPLLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,6 @@ export class ToAREPLLogic{
// while typing
syntaxPromise = this.PythonEvaluator.checkSyntax(data.savedCode + data.evalCode)
syntaxPromise.then(() => {
// to check for free executor:
// freeEvaluator = evaluators.first(evaluator=>evaluator.free)

// cancel setinterval
// restart all Executing or DirtyFree processes
// if no freshfree executor:
setInterval(()=>{
// if free executor, send code
}, 60)
// else: send code to first free executor
// send code func:
// foo.execCode(data)
// set last ran executor
this.PythonEvaluator.execCode(data)
})
.catch((error: NodeJS.ErrnoException|string) => {
Expand Down

0 comments on commit a2c78aa

Please sign in to comment.