diff --git a/resources/js/electron-plugin/dist/index.js b/resources/js/electron-plugin/dist/index.js index ec24f5b8..2370b3a7 100644 --- a/resources/js/electron-plugin/dist/index.js +++ b/resources/js/electron-plugin/dist/index.js @@ -11,7 +11,7 @@ import { app } from "electron"; import { autoUpdater } from "electron-updater"; import state from "./server/state"; import { electronApp, optimizer } from "@electron-toolkit/utils"; -import { retrieveNativePHPConfig, retrievePhpIniSettings, runScheduler, startAPI, startPhpApp, startQueue, } from "./server"; +import { retrieveNativePHPConfig, retrievePhpIniSettings, runScheduler, startAPI, startPhpApp, } from "./server"; import { notifyLaravel } from "./server/utils"; import { resolve } from "path"; import { stopAllProcesses } from "./server/api/childProcess"; @@ -75,7 +75,6 @@ class NativePHP { yield this.startElectronApi(); state.phpIni = yield this.loadPhpIni(); yield this.startPhpApp(); - yield this.startQueueWorker(); this.startScheduler(); yield notifyLaravel("booted"); }); @@ -148,11 +147,6 @@ class NativePHP { this.processes.push(yield startPhpApp()); }); } - startQueueWorker() { - return __awaiter(this, void 0, void 0, function* () { - this.processes.push(yield startQueue()); - }); - } startScheduler() { const now = new Date(); const delay = (60 - now.getSeconds()) * 1000 + (1000 - now.getMilliseconds()); diff --git a/resources/js/electron-plugin/dist/server/index.js b/resources/js/electron-plugin/dist/server/index.js index ce1da481..e222e918 100644 --- a/resources/js/electron-plugin/dist/server/index.js +++ b/resources/js/electron-plugin/dist/server/index.js @@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; import startAPIServer from "./api"; -import { retrieveNativePHPConfig, retrievePhpIniSettings, serveApp, startQueueWorker, startScheduler, } from "./php"; +import { retrieveNativePHPConfig, retrievePhpIniSettings, serveApp, startScheduler, } from "./php"; import { appendCookie } from "./utils"; import state from "./state"; export function startPhpApp() { @@ -19,14 +19,6 @@ export function startPhpApp() { return result.process; }); } -export function startQueue() { - if (!process.env.NATIVE_PHP_SKIP_QUEUE) { - return startQueueWorker(state.randomSecret, state.electronApiPort, state.phpIni); - } - else { - return undefined; - } -} export function runScheduler() { startScheduler(state.randomSecret, state.electronApiPort, state.phpIni); } diff --git a/resources/js/electron-plugin/dist/server/php.js b/resources/js/electron-plugin/dist/server/php.js index d11d2298..c8a32198 100644 --- a/resources/js/electron-plugin/dist/server/php.js +++ b/resources/js/electron-plugin/dist/server/php.js @@ -95,14 +95,6 @@ function ensureAppFoldersAreAvailable() { writeFileSync(databaseFile, ''); } } -function startQueueWorker(secret, apiPort, phpIniSettings = {}) { - const env = getDefaultEnvironmentVariables(secret, apiPort); - const phpOptions = { - cwd: appPath, - env - }; - return callPhp(['artisan', 'queue:work', '-q'], phpOptions, phpIniSettings); -} function startScheduler(secret, apiPort, phpIniSettings = {}) { const env = getDefaultEnvironmentVariables(secret, apiPort); const phpOptions = { @@ -214,4 +206,4 @@ function serveApp(secret, apiPort, phpIniSettings) { }); })); } -export { startQueueWorker, startScheduler, serveApp, getAppPath, retrieveNativePHPConfig, retrievePhpIniSettings, getDefaultEnvironmentVariables, getDefaultPhpIniSettings }; +export { startScheduler, serveApp, getAppPath, retrieveNativePHPConfig, retrievePhpIniSettings, getDefaultEnvironmentVariables, getDefaultPhpIniSettings }; diff --git a/resources/js/electron-plugin/src/index.ts b/resources/js/electron-plugin/src/index.ts index 2daccdca..f95bdc77 100644 --- a/resources/js/electron-plugin/src/index.ts +++ b/resources/js/electron-plugin/src/index.ts @@ -9,7 +9,6 @@ import { runScheduler, startAPI, startPhpApp, - startQueue, } from "./server"; import { notifyLaravel } from "./server/utils"; import { resolve } from "path"; @@ -101,7 +100,6 @@ class NativePHP { state.phpIni = await this.loadPhpIni(); await this.startPhpApp(); - await this.startQueueWorker(); this.startScheduler(); await notifyLaravel("booted"); @@ -184,10 +182,6 @@ class NativePHP { this.processes.push(await startPhpApp()); } - private async startQueueWorker() { - this.processes.push(await startQueue()); - } - private startScheduler() { const now = new Date(); const delay = diff --git a/resources/js/electron-plugin/src/server/index.ts b/resources/js/electron-plugin/src/server/index.ts index 1d978d22..5d33bcd9 100644 --- a/resources/js/electron-plugin/src/server/index.ts +++ b/resources/js/electron-plugin/src/server/index.ts @@ -3,7 +3,6 @@ import { retrieveNativePHPConfig, retrievePhpIniSettings, serveApp, - startQueueWorker, startScheduler, } from "./php"; import { appendCookie } from "./utils"; @@ -23,18 +22,6 @@ export async function startPhpApp() { return result.process; } -export function startQueue() { - if (!process.env.NATIVE_PHP_SKIP_QUEUE) { - return startQueueWorker( - state.randomSecret, - state.electronApiPort, - state.phpIni - ); - } else { - return undefined; - } -} - export function runScheduler() { startScheduler(state.randomSecret, state.electronApiPort, state.phpIni); } diff --git a/resources/js/electron-plugin/src/server/php.ts b/resources/js/electron-plugin/src/server/php.ts index da8ba909..5193d472 100644 --- a/resources/js/electron-plugin/src/server/php.ts +++ b/resources/js/electron-plugin/src/server/php.ts @@ -114,17 +114,6 @@ function ensureAppFoldersAreAvailable() { } } -function startQueueWorker(secret, apiPort, phpIniSettings = {}) { - const env = getDefaultEnvironmentVariables(secret, apiPort); - - const phpOptions = { - cwd: appPath, - env - }; - - return callPhp(['artisan', 'queue:work', '-q'], phpOptions, phpIniSettings); -} - function startScheduler(secret, apiPort, phpIniSettings = {}) { const env = getDefaultEnvironmentVariables(secret, apiPort); @@ -262,4 +251,4 @@ function serveApp(secret, apiPort, phpIniSettings): Promise { }) } -export {startQueueWorker, startScheduler, serveApp, getAppPath, retrieveNativePHPConfig, retrievePhpIniSettings, getDefaultEnvironmentVariables, getDefaultPhpIniSettings} +export {startScheduler, serveApp, getAppPath, retrieveNativePHPConfig, retrievePhpIniSettings, getDefaultEnvironmentVariables, getDefaultPhpIniSettings}