HeliosX::Job::JSON::TestService - service for testing HeliosX::Job::JSON jobs
# create a Helios job using HeliosX::Job::JSON use HeliosX::Job::JSON; my $json = qq/ { "jobtype" : "HeliosX::Job::JSON::TestService", "args" : { "arg1" : "value1", "arg2" : "value2" } } /; my $job = HeliosX::Job::JSON->new(argstring => $json); my $jobid = $job->submit(); --OR-- # create a Helios job using the heliosx_job_json_submit command heliosx_job_json_submit --jobtype=HeliosX::Job::JSON::TestService --args='{"args":{"arg1":"value1","arg2":"value2"}}' # then start a HeliosX::Job::JSON::TestService daemon # the service will log a hello message # and the individual job args to the configured log(s) helios.pl HeliosX::Job::JSON::TestService
HeliosX::Job::JSON::TestService is a Helios service that can be used for testing HeliosX::Job::JSON jobs.
The JobClass method tells the Helios system to use HeliosX::Job::JSON instead of the default Helios::Job when working with HeliosX::Job::JSON::TestService.
The run() method of HeliosX::Job::JSON::TestService is a bare-bones method. It logs a "Hello World" message to the Helios logging system, and then logs all of the job arguments in the job it was given.
The remarkable thing about this run() method is that it is wholly unmarkable; even though the job argument format and parser has changed, the run() method is no different than one using the default job class and XML-format arguments.
Andrew Johnson, <lajandy at cpan dot org>
Copyright (C) 2014 by Logical Helion, LLC.
This library is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. See the included LICENSE file for details.
This software comes with no warranty of any kind.
To install HeliosX::Job::JSON, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HeliosX::Job::JSON
CPAN shell
perl -MCPAN -e shell install HeliosX::Job::JSON
For more information on module installation, please visit the detailed CPAN module installation guide.