Skip to content

Commit

Permalink
[backend] Remove unused libs, update function name
Browse files Browse the repository at this point in the history
  • Loading branch information
MananGandhi1810 committed Jan 15, 2025
1 parent 83ff640 commit 9590649
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions backend/bin/www
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
import app from "../index.js";
import debug from "debug";
import http from "http";
import https from "https";
import fs from "fs";
import { onQueueMessage } from "../utils/queue-manager.js";
import { executeFromQueue } from "../execution-worker/execute.js";
import { executeCode } from "../execution-worker/execute.js";

/**
* Get port from environment and store in Express.
Expand All @@ -22,7 +20,7 @@ app.set("port", port);
var server = http.createServer(app);

try {
await onQueueMessage("execute", executeFromQueue);
await onQueueMessage("execute", executeCode);
} catch (e) {
console.log("Could not subscribe to Redis Pub/Sub");
}
Expand Down
4 changes: 2 additions & 2 deletions backend/execution-worker/execute.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { get, set } from "../utils/keyvalue-db.js";

const prisma = new PrismaClient();

const executeFromQueue = async (message, channel) => {
const executeCode = async (message, channel) => {
const {
code,
language,
Expand Down Expand Up @@ -196,4 +196,4 @@ const executeFromQueue = async (message, channel) => {
}
};

export { executeFromQueue };
export { executeCode };

0 comments on commit 9590649

Please sign in to comment.