summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorEudyptula <eitan@mosenkis.net>2009-07-20 16:39:03 -0400
committerEudyptula <eitan@mosenkis.net>2009-07-20 16:39:03 -0400
commit17644ae3145edf84ebce8549bee98a8c1be3f6ea (patch)
tree941bb5db0d3ed17680bedf6e84078cf32ed15c0c /shared
parentLittle backend output cleanup (diff)
downloadingenue-17644ae3145edf84ebce8549bee98a8c1be3f6ea.tar.gz
ingenue-17644ae3145edf84ebce8549bee98a8c1be3f6ea.tar.bz2
ingenue-17644ae3145edf84ebce8549bee98a8c1be3f6ea.zip
Fixes/hacks so backend still works with non-execution logging
Diffstat (limited to 'shared')
-rw-r--r--shared/classes/configuration.php2
-rw-r--r--shared/classes/task.php7
2 files changed, 4 insertions, 5 deletions
diff --git a/shared/classes/configuration.php b/shared/classes/configuration.php
index e315047..a3cdec3 100644
--- a/shared/classes/configuration.php
+++ b/shared/classes/configuration.php
@@ -53,7 +53,7 @@ class sql_configuration extends conf_build_common {
$opt->write();
}
$build->ctime=time();
- $build->status=1;
+ $build->status=-128;
$build->write();
return $build;
}
diff --git a/shared/classes/task.php b/shared/classes/task.php
index d5578b2..571c895 100644
--- a/shared/classes/task.php
+++ b/shared/classes/task.php
@@ -81,7 +81,7 @@ class sql_task extends sql_row_obj {
throw_exception('task has already executed: start is '.$this->start);
}
$this->type='exec';
- log_msg('Executing '.$this->command.'...', false);
+ debug('Executing '.$this->command.'...');
$descriptorspec=array(
0 => array('pipe', 'r'), // STDIN
1 => array('pipe', 'w'), // STDOUT
@@ -98,7 +98,6 @@ class sql_task extends sql_row_obj {
foreach ($pipes as $pipe) {
stream_set_blocking($pipe, 0);
}
- $msg=0;
while (true) {
$null=null; // We have to set these all to variables because stream_select requires pass by reference
$outs=array_slice($pipes, 1);
@@ -108,13 +107,13 @@ class sql_task extends sql_row_obj {
$c=stream_get_contents($pipes[2]);
if ($c) {
// STDERR
- $entry=new sql_buildlog_entry($this->build, $this->order, $msg++, time(), 'stderr', $c);
+ $entry=new sql_buildlog_entry($this->build, $this->order, buildlog_entry_get_order(), time(), 'stderr', $c);
$entry->write();
}
$c=stream_get_contents($pipes[1]);
if ($c) {
// STDOUT
- $entry=new sql_buildlog_entry($this->build, $this->order, $msg++, time(), 'stdout', $c);
+ $entry=new sql_buildlog_entry($this->build, $this->order, buildlog_entry_get_order(), time(), 'stdout', $c);
$entry->write();
}
}