mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-29 07:19:23 +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
|
my $USERNAME = 'vm'; # variable for easier string interpolation
|
||||||
|
|
||||||
use constant MOD_DIR => '/usr/local/share/pbot-vm/Languages';
|
use constant {
|
||||||
use constant SERIAL => '/dev/ttyS1';
|
MOD_DIR => '/usr/local/share/pbot-vm/Languages',
|
||||||
use constant HEARTBEAT => '/dev/ttyS2';
|
SERIAL => '/dev/ttyS1',
|
||||||
use constant INPUT => '/dev/stdin';
|
HEARTBEAT => '/dev/ttyS2',
|
||||||
use constant OUTPUT => '/dev/stdout';
|
INPUT => '/dev/stdin',
|
||||||
|
OUTPUT => '/dev/stdout',
|
||||||
|
};
|
||||||
|
|
||||||
use lib MOD_DIR;
|
use lib MOD_DIR;
|
||||||
|
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
#!/usr/bin/env perl
|
#!/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-FileCopyrightText: 2021 Pragmatic Software <pragma78@gmail.com>
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
# File: compiler_server.pl
|
# File: vm-server
|
||||||
#
|
#
|
||||||
# Purpose: The compiler server manages the guest virtual machine state and
|
# Purpose: The compiler server manages the guest virtual machine state and
|
||||||
# listens for incoming compile requests. This server can be run on any remote
|
# listens for incoming compile requests. This server can be run on any remote
|
||||||
@ -219,7 +219,7 @@ sub vm_server {
|
|||||||
print "Attempting compile...\n";
|
print "Attempting compile...\n";
|
||||||
alarm 0;
|
alarm 0;
|
||||||
|
|
||||||
my ($ret, $result) = execute("perl bin/compiler_run.pl $line");
|
my ($ret, $result) = execute("perl vm-exec $line");
|
||||||
|
|
||||||
if(not defined $ret) {
|
if(not defined $ret) {
|
||||||
#print "parent continued\n";
|
#print "parent continued\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user