Changeset 2769

Show
Ignore:
Timestamp:
07/14/08 19:56:22 (17 months ago)
Author:
bchoate
Message:

Updated POD.

Location:
branches/release-41/lib/MT
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/release-41/lib/MT/TheSchwartz.pm

    r2340 r2769  
    255255 
    2562561; 
     257__END__ 
     258 
     259=head1 NAME 
     260 
     261MT::TheSchwartz - Movable Type 
     262 
     263=head1 SYNOPSIS 
     264 
     265    use MT; 
     266    use MT::TheSchwartz; 
     267    my $mt = MT->new; 
     268    my $schwartz = MT::TheSchwartz->new(%cfg); 
     269    $schwartz->work_until_done; 
     270 
     271=head1 DESCRIPTION 
     272 
     273A subclass of C<TheSchwartz>, a job queue system. The MT subclass is 
     274responsible for configuring TheSchwartz to work with the MT database 
     275configuration and supplies TheSchwartz worker classes from the MT 
     276registry. 
     277 
     278=head1 METHODS 
     279 
     280=head2 MT::TheSchwartz->instance 
     281 
     282Returns the singleton instance for the C<MT::TheSchwartz> class. 
     283 
     284=head2 MT::TheSchwartz->debug 
     285 
     286Static (or instance) method that simply forwards the parameters given on 
     287to the singleton instance. 
     288 
     289=head2 MT::TheSchwartz->insert 
     290 
     291Static (or instance) method that simply forwards the parameters given on 
     292to the singleton instance. 
     293 
     294=head2 $schwartz->default_logger($msg, $job) 
     295 
     296Handles logging messages for C<TheSchwartz>. When a log message is issued, 
     297this method takes over. In this case, this subclass suppresses the 
     298"job completed" messages issued by C<TheSchwartz>. 
     299 
     300=head2 $schwartz->work_periodically([$delay]) 
     301 
     302Invokes C<TheSchwartz> to process available jobs, then queries the MT 
     303session table for available MT registered tasks that may be ready to 
     304run. MT tasks such as publishing scheduled posts, expiration of 
     305spam comments and trackbacks, etc. This routine runs in an infinite 
     306loop-- after scheduled tasks are run, it will delay C<$delay> seconds 
     307(default of 5 seconds), then checks for more Schwartz jobs to process. 
     308 
     309=cut 
  • branches/release-41/lib/MT/Touch.pm

    r1723 r2769  
    6363 
    64641; 
     65__END__ 
     66 
     67=head1 NAME 
     68 
     69MT::Touch - Object class for recording object type modification times 
     70 
     71=head1 SYNOPSIS 
     72 
     73    # record that an entry object was modified for blog # $blog_id 
     74    use MT::Touch; 
     75    MT::Touch->touch( $blog_id, 'entry'); 
     76 
     77    my $ts = MT::Touch->latest_touch($blog_id, 'entry'); 
     78 
     79=head1 DESCRIPTION 
     80 
     81This module is used to store and retrieve the last modification timestamp 
     82for any registered object type. This is primarily utilized by the 
     83module caching layer of Movable Type, where caches can expire based on 
     84changes to entries, pages, categories, etc. Timestamps stored to the 
     85'modified_on' column are in UTC time. 
     86 
     87=head1 METHODS 
     88 
     89=head2 MT::Touch->touch( $blog_id, @types ) 
     90 
     91Records a MT::Touch object for each type given, for the blog ID specified. 
     92For non-blog objects, feel free to pass a '0' for blog_id. 
     93 
     94=head2 MT::Touch->latest_touch( $blog_id, @types ) 
     95 
     96Returns the ltest timestamp recorded for any of the object types requested 
     97for the blog ID specified. The timestamp is returned (YYYYMMDDHHMISS format), 
     98in UTC time. If no touches exist, C<undef> is the return value. 
     99 
     100=cut