mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-22 03:49:29 +01:00
Fix vm-server
This commit is contained in:
parent
917d9b7c50
commit
4d0e06e111
@ -14,11 +14,13 @@ use JSON::XS;
|
||||
|
||||
my $USERNAME = 'vm'; # variable for easier string interpolation
|
||||
|
||||
use constant MOD_DIR => '/usr/local/share/pbot-vm/Languages';
|
||||
use constant SERIAL => '/dev/ttyS1';
|
||||
use constant HEARTBEAT => '/dev/ttyS2';
|
||||
use constant INPUT => '/dev/stdin';
|
||||
use constant OUTPUT => '/dev/stdout';
|
||||
use constant {
|
||||
MOD_DIR => '/usr/local/share/pbot-vm/Languages',
|
||||
SERIAL => '/dev/ttyS1',
|
||||
HEARTBEAT => '/dev/ttyS2',
|
||||
INPUT => '/dev/stdin',
|
||||
OUTPUT => '/dev/stdout',
|
||||
};
|
||||
|
||||
use lib MOD_DIR;
|
||||
|
||||
|
@ -1,5 +1,10 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
# File: vm-watchdog
|
||||
#
|
||||
# Purpose: Monitors pbot-vm cpu usage. Resets vm to snapshot if cpu exceeds
|
||||
# threshold limits.
|
||||
|
||||
# SPDX-FileCopyrightText: 2021 Pragmatic Software <pragma78@gmail.com>
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
# File: compiler_server.pl
|
||||
# File: vm-server
|
||||
#
|
||||
# Purpose: The compiler server manages the guest virtual machine state and
|
||||
# listens for incoming compile requests. This server can be run on any remote
|
||||
@ -219,7 +219,7 @@ sub vm_server {
|
||||
print "Attempting compile...\n";
|
||||
alarm 0;
|
||||
|
||||
my ($ret, $result) = execute("perl bin/compiler_run.pl $line");
|
||||
my ($ret, $result) = execute("perl vm-exec $line");
|
||||
|
||||
if(not defined $ret) {
|
||||
#print "parent continued\n";
|
||||
|
Loading…
Reference in New Issue
Block a user