Skip to content
Snippets Groups Projects
Commit d1341237 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[ivette/server] fix command line

parent 45b1f4f3
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,9 @@ import { json } from 'dome/data/json';
export interface Client {
/** Server CLI */
commandLine(sockaddr: string, params: string[]): string[];
/** Connection */
connect(addr: string): void;
......
......@@ -40,6 +40,11 @@ class SocketClient implements Client {
queue: json[] = [];
buffer: Buffer = Buffer.from('');
/** Server CLI */
commandLine(sockaddr: string, params: string[]): string[] {
return ['-server-socket', sockaddr, '-then'].concat(params);
}
/** Connection */
connect(sockaddr: string): void {
if (this.socket) {
......
......@@ -33,15 +33,17 @@ const pollingTimeout = 50;
class ZmqClient implements Client {
constructor() { }
events = new Emitter();
queueCmd: string[] = [];
queueId: string[] = [];
zmqSocket: ZmqRequest | undefined;
zmqIsBusy = false;
/** Server CLI */
commandLine(sockaddr: string, params: string[]): string[] {
return ['-server-zmq', sockaddr, '-then'].concat(params);
}
/** Connection */
connect(sockaddr: string): void {
if (!this.zmqSocket) {
......
......@@ -458,7 +458,7 @@ async function _launch() {
if (!cwd) cwd = System.getWorkingDir();
logout = logout && System.join(cwd, logout);
logerr = logerr && System.join(cwd, logerr);
params = ['-server-zmq', sockaddr, '-then'].concat(params);
params = client.commandLine(sockaddr, params);
const options = {
cwd,
stdout: { path: logout, pipe: true },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment