Changeset 152

Show
Ignore:
Timestamp:
02/08/09 20:51:55 (10 months ago)
Author:
swistow
Message:

Add documentation for scoreboard, thus making the pod coverage tests pass

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/TheSchwartz.pm

    r142 r152  
    10091009Given an open driver I<$driver> to a database, gets the current server time from the database. 
    10101010 
     1011=head1 THE SCOREBOARD 
     1012 
     1013The scoreboards can be used to monitor what the TheSchwartz::Worker subclasses are 
     1014currently working on.  Once the scoreboard has been enabled in the workers with 
     1015C<set_scoreboard> method the C<thetop> utility (shipped with TheSchwartz distribuition 
     1016in the C<extras> directory) can be used to list all current jobs being worked on. 
     1017 
     1018=head2 C<< $client->set_scoreboard( $dir ) >> 
     1019 
     1020Enables the scoreboard.  Setting this to C<1> or C<on> will cause TheSchwartz to create 
     1021a scoreboard file in a location it determines is optimal. 
     1022 
     1023Passing in any other option sets the directory the TheSchwartz scoreboard directory should 
     1024be created in.  For example, if you set this to C</tmp> then this would create a directory 
     1025called C</tmp/theschwartz> and a scoreboard file C</tmp/theschwartz/scoreboard.pid> in it 
     1026(where pid is the current process pid.)  
     1027 
     1028=head2 C<< $client->scoreboard() >> 
     1029 
     1030Returns the path to the current scoreboard file. 
     1031 
     1032=head2 C<< $client->start_scoreboard() >> 
     1033 
     1034Writes the current job information to the scoreboard file (called by the worker 
     1035in work_safely before it actually starts working) 
     1036 
     1037=head2 C<< $client->end_scoreboard() >> 
     1038 
     1039Appends the current job duration to the end of the scoreboard file (called by 
     1040the worker in work_safely once work has been completed) 
     1041 
     1042=head2 C<< $client->clean_scoreboard() >> 
     1043 
     1044Removes the scoreboard file (but not the scoreboard directory.)  Automatically 
     1045called by TheSchwartz during object destruction (i.e. when the instance goes 
     1046out of scope) 
     1047 
    10111048=head1 COPYRIGHT, LICENSE & WARRANTY 
    10121049