12 |
|
|
13 |
BEGIN { Jifty->new; }; |
BEGIN { Jifty->new; }; |
14 |
|
|
15 |
my $limit = 100; |
my $limit = 0; |
16 |
|
my @models; |
17 |
GetOptions( |
GetOptions( |
18 |
'limit=i', => \$limit, |
'limit=i', => \$limit, |
19 |
|
'model=s', => \@models, |
20 |
); |
); |
21 |
|
|
22 |
|
@models = ( 'Organization' ) unless @models; |
23 |
|
|
24 |
my $ldap = A3C::LDAP->new; |
my $ldap = A3C::LDAP->new; |
25 |
|
|
26 |
foreach my $model ( qw/Organization User/ ) { |
Jifty->log->info( 'syncing: ', join(',', @models) ); |
27 |
|
|
28 |
|
foreach my $model ( @models ) { |
29 |
my $collection = $ldap->collection( $model, $limit ); |
my $collection = $ldap->collection( $model, $limit ); |
30 |
Jifty->log->info( "found ", $collection->count, " entries for $model" ); |
Jifty->log->info( "found ", $collection->count, " entries for $model" ); |
31 |
} |
} |