Changeset 727
- Timestamp:
- 10/18/06 22:09:19 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/DJabberd-LiveJournal/lib/DJabberd/Authen/LiveJournal.pm
r707 r727 6 6 7 7 sub can_check_digest { 1 } 8 9 our $cluster_if;10 11 sub cluster_if {12 return $cluster_if;13 }14 15 sub set_config_clusterif {16 my ($self, $val) = @_;17 $cluster_if = $val;18 }19 20 8 21 9 sub check_digest { … … 38 26 # non-blocking auth lookup, using gearman. 39 27 if ($gc) { 40 $gc->add_task(Gearman::Task->new("ljtalk_auth_check" => \Storable::nfreeze([$user,$streamid,$digest,$resource, $conn->peer_ip_string , $self->cluster_if]), {28 $gc->add_task(Gearman::Task->new("ljtalk_auth_check" => \Storable::nfreeze([$user,$streamid,$digest,$resource, $conn->peer_ip_string]), { 41 29 uniq => "-", 42 30 retry_count => 2, trunk/DJabberd-LiveJournal/lib/DJabberd/Plugin/LiveJournal.pm
r725 r727 30 30 my $self = shift; 31 31 die "No gearmand servers configured in GearmanServers\n" unless $gearman_client; 32 } 33 34 our $cluster_if; 35 36 sub cluster_if { 37 return $cluster_if; 38 } 39 40 sub set_config_clusterif { 41 my ($self, $val) = @_; 42 $cluster_if = $val; 32 43 } 33 44 … … 188 199 my $username = $bj->node; 189 200 201 $gc->add_task(Gearman::Task->new("ljtalk_initial_presence" => \Storable::nfreeze([$username, $bj->resource, $conn->peer_ip_string]), { 202 uniq => '-', 203 retry_count => 2, 204 timeout => 10, 205 on_fail => sub { 206 $DJabberd::Stats::counter{'ljtalk_initial_presence_fail'}++; 207 }, 208 on_complete => sub { 209 $DJabberd::Stats::counter{'ljtalk_initial_presence_success'}++; 210 }, 211 })); 212 190 213 $gc->add_task(Gearman::Task->new("ljtalk_user_motd" => \Storable::nfreeze([$username]), { 191 214 uniq => "-",
