From d07b2dda47346c3c5b94c3019d0fdfa5165247eb Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 23 Apr 2013 00:54:36 +0800 Subject: Bug 750170: switch from arecibo to sentry for error reporting --- arecibo.pl | 65 -------------------------------------------------------------- 1 file changed, 65 deletions(-) delete mode 100755 arecibo.pl (limited to 'arecibo.pl') diff --git a/arecibo.pl b/arecibo.pl deleted file mode 100755 index 93c34c999..000000000 --- a/arecibo.pl +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/perl -w - -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This Source Code Form is "Incompatible With Secondary Licenses", as -# defined by the Mozilla Public License, v. 2.0. - -# -# report errors to arecibo -# expects a filename with a Data::Dumper serialised parameters -# called by Bugzilla::Arecibo -# - -use strict; -use warnings; - -use FindBin qw($Bin); -use lib $Bin; -use lib "$Bin/lib"; - -use Bugzilla; -use Bugzilla::Constants; -use File::Slurp; -use POSIX qw(setsid nice); -use Safe; -use Fcntl qw(:flock); - -Bugzilla->usage_mode(USAGE_MODE_CMDLINE); -nice(19); - -# detach -open(STDIN, '/dev/null'); -open(STDERR, '>/dev/null'); -setsid(); - -# grab arecibo server url -my $arecibo_server = Bugzilla->params->{arecibo_server} || ''; -exit(1) unless $arecibo_server; - -# read data dump -exit(1) unless my $filename = shift; -my $dump = read_file($filename); -unlink($filename); - -# deserialise -my $cpt = new Safe; -$cpt->reval($dump) || exit(1); -my $data = ${$cpt->varglob('VAR1')}; - -# ensure we send warnings one at a time per webhead -flock(DATA, LOCK_EX); - -# and post to arecibo -my $agent = LWP::UserAgent->new( - agent => 'bugzilla.mozilla.org', - timeout => 10, # seconds -); -$agent->post($arecibo_server, $data); - -__DATA__ -this exists so the flock() code works. -do not remove this data section. -- cgit v1.2.3-24-g4f1b