/[A3C]/bin/import-strix-sites.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /bin/import-strix-sites.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 236 - (show annotations)
Sun Sep 7 21:22:10 2008 UTC (10 years, 10 months ago) by dpavlin
File MIME type: text/plain
File size: 639 byte(s)
move strix sites import into module Strix::Import so
that command-line script and action can re-use it,
creating on-demand sync for sites.
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6 use lib 'lib';
7
8 use Jifty;
9 use Data::Dump qw/dump/;
10 use Strix::Import;
11
12 my $debug = 0;
13
14 BEGIN { Jifty->new; };
15 Jifty->web->request(Jifty::Request->new);
16 Jifty->web->response(Jifty::Response->new);
17
18 #my $config = Jifty->config->app('strix') or die "need strix config";
19
20 my $instances = A3C::Model::StrixInstanceCollection->new;
21 $instances->unlimit;
22
23 my ( $total_sites, $total_instances ) = ( 0, 0 );
24
25 while ( my $i = $instances->next ) {
26 $total_instances++;
27 $total_sites += Strix::Import->sites( $i->instance );
28 }
29
30 Jifty->log->info( "$total_sites Strix sites from $total_instances imported" );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26