Autobuilder: Notify autologger of commits.
Interact.cpp: Added category to LOG calls. Atlas: Renamed all handler source files, so they won't conflict with other files of the same name. (Fixes bug #77) This was SVN commit r3721.
This commit is contained in:
parent
d9944f9524
commit
001e951066
@ -1,7 +1,5 @@
|
|||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
|
|
||||||
#include "CLogger.h"
|
|
||||||
|
|
||||||
#include "Interact.h"
|
#include "Interact.h"
|
||||||
#include "Renderer.h"
|
#include "Renderer.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
@ -26,6 +24,9 @@
|
|||||||
#include "MathUtil.h"
|
#include "MathUtil.h"
|
||||||
#include "graphics/GameView.h"
|
#include "graphics/GameView.h"
|
||||||
|
|
||||||
|
#include "ps/CLogger.h"
|
||||||
|
#define LOG_CATEGORY "world"
|
||||||
|
|
||||||
extern CConsole* g_Console;
|
extern CConsole* g_Console;
|
||||||
extern CStr g_CursorName;
|
extern CStr g_CursorName;
|
||||||
extern float g_xres, g_yres;
|
extern float g_xres, g_yres;
|
||||||
@ -838,13 +839,13 @@ int CSelectedEntities::loadRankTextures()
|
|||||||
const char* filename = it->c_str();
|
const char* filename = it->c_str();
|
||||||
if ( !tex_is_known_extension(filename) )
|
if ( !tex_is_known_extension(filename) )
|
||||||
{
|
{
|
||||||
LOG(ERROR, "Unknown rank texture extension (%s)", filename);
|
LOG(ERROR, LOG_CATEGORY, "Unknown rank texture extension (%s)", filename);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Handle ht = ogl_tex_load(filename);
|
Handle ht = ogl_tex_load(filename);
|
||||||
if (ht <= 0)
|
if (ht <= 0)
|
||||||
{
|
{
|
||||||
LOG(ERROR, "Rank Textures", "loadRankTextures failed on \"%s\"", filename);
|
LOG(ERROR, LOG_CATEGORY, "loadRankTextures failed on \"%s\"", filename);
|
||||||
return ht;
|
return ht;
|
||||||
}
|
}
|
||||||
m_rankTextures[it->AfterLast("/")] = ht;
|
m_rankTextures[it->AfterLast("/")] = ht;
|
||||||
|
@ -9,7 +9,7 @@ use constant EXIT_NOTCOMPILED => 1;
|
|||||||
use constant EXIT_FAILED => 2;
|
use constant EXIT_FAILED => 2;
|
||||||
use constant EXIT_ABORTED => 3;
|
use constant EXIT_ABORTED => 3;
|
||||||
|
|
||||||
use POE qw(Component::Server::TCP Filter::HTTPD Filter::Line);
|
use POE qw(Component::Server::TCP Component::Client::HTTP Filter::HTTPD Filter::Line);
|
||||||
use HTTP::Response;
|
use HTTP::Response;
|
||||||
|
|
||||||
use Win32::Process;
|
use Win32::Process;
|
||||||
@ -32,6 +32,8 @@ sub LOG {
|
|||||||
print $msg;
|
print $msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $main_session; # main POE::Session object
|
||||||
|
|
||||||
POE::Component::Server::TCP->new(
|
POE::Component::Server::TCP->new(
|
||||||
Alias => "web_server",
|
Alias => "web_server",
|
||||||
Port => 57470,
|
Port => 57470,
|
||||||
@ -59,6 +61,7 @@ POE::Component::Server::TCP->new(
|
|||||||
abort_build();
|
abort_build();
|
||||||
$response->push_header('Content-type', 'text/plain');
|
$response->push_header('Content-type', 'text/plain');
|
||||||
$response->content("Build initiated.");
|
$response->content("Build initiated.");
|
||||||
|
$kernel->post($main_session, 'commit_notify');
|
||||||
}
|
}
|
||||||
elsif ($url eq '/force_build.html')
|
elsif ($url eq '/force_build.html')
|
||||||
{
|
{
|
||||||
@ -186,10 +189,14 @@ EOF
|
|||||||
|
|
||||||
$heap->{client}->put($response);
|
$heap->{client}->put($response);
|
||||||
$kernel->yield("shutdown");
|
$kernel->yield("shutdown");
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
POE::Session->create(
|
POE::Component::Client::HTTP->spawn(
|
||||||
|
Alias => "web_client",
|
||||||
|
);
|
||||||
|
|
||||||
|
$main_session = POE::Session->create(
|
||||||
inline_states => {
|
inline_states => {
|
||||||
_start => sub {
|
_start => sub {
|
||||||
$_[KERNEL]->delay(tick => 1);
|
$_[KERNEL]->delay(tick => 1);
|
||||||
@ -226,7 +233,19 @@ POE::Session->create(
|
|||||||
start_build(commit => 1);
|
start_build(commit => 1);
|
||||||
$commit_required = 0;
|
$commit_required = 0;
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
|
commit_notify => sub {
|
||||||
|
$_[KERNEL]->post('web_client', 'request', 'commit_notify_response',
|
||||||
|
new HTTP::Request(GET => 'http://192.168.0.223/wfg/svnlog.cgi/logupdate/doupdate'));
|
||||||
|
},
|
||||||
|
|
||||||
|
commit_notify_response => sub {
|
||||||
|
my $response_packet = $_[ARG1];
|
||||||
|
my $response = $response_packet->[0];
|
||||||
|
LOG "notified - ".$response->content;
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user