ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/map-tags.ext
(Generate patch)

Comparing deliantra/server/ext/map-tags.ext (file contents):
Revision 1.23 by root, Thu Apr 22 12:50:24 2010 UTC vs.
Revision 1.25 by root, Thu Apr 29 08:22:17 2010 UTC

2 2
3our $SCHEDULE_INTERVAL = $cf::CFG{extractor_schedule_interval} || 3600; 3our $SCHEDULE_INTERVAL = $cf::CFG{extractor_schedule_interval} || 3600;
4 4
5use JSON::XS; 5use JSON::XS;
6 6
7our $db_mapinfo = cf::sync_job { cf::db_table "tag-mapinfo" }; # info/cache for maps 7our $db_mapinfo = cf::db_table "tag-mapinfo"; # info/cache for maps
8our $db_target = cf::sync_job { cf::db_table "tag-target" }; # tag => maps 8our $db_target = cf::db_table "tag-target"; # tag => maps
9 9
10sub remove_tag_target { 10sub remove_tag_target {
11 my ($txn, $tag, $target) = @_; 11 my ($txn, $tag, $target) = @_;
12 # - U O 12 # - U O
13 13
70 70
71 # we don't actually care if it succeeds or not, as we 71 # we don't actually care if it succeeds or not, as we
72 # will just retry an hour later 72 # will just retry an hour later
73 BDB::db_txn_finish $txn; 73 BDB::db_txn_finish $txn;
74 74
75 warn "tag-updated $file (= $key) <@tags>\n" 75 cf::debug "tag-updated $file (= $key) <@tags>\n"
76 if @tags; 76 if @tags;
77} 77}
78 78
79sub scan_static { 79sub scan_static {
80 my $maps = cf::map::static_maps; 80 my $maps = cf::map::static_maps;
149# delete $map->{deny_reset}; 149# delete $map->{deny_reset};
150# } 150# }
151# } 151# }
152# } 152# }
153 153
154 warn sprintf "map-tag scan finished (%fs)\n", AE::time - $start; 154 cf::info sprintf "map-tag scan finished (%fs)\n", AE::time - $start;
155} 155}
156 156
157our $RELOAD_SCHEDULER = cf::periodic $SCHEDULE_INTERVAL, Coro::unblock_sub { 157our $RELOAD_SCHEDULER = cf::periodic $SCHEDULE_INTERVAL, Coro::unblock_sub {
158 $Coro::current->prio (Coro::PRIO_MIN); 158 $Coro::current->prio (Coro::PRIO_MIN);
159 $Coro::current->desc ("map-tag scanner"); 159 $Coro::current->desc ("map-tag scanner");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines