Implement the PgeJobSubmitter Adaptation
You can go through the introduction here: PGE Execution
Create the script mentioned in the
chimera_config.yaml
file under thejob_submitter.module_path
.In the script, declare the subclass mentioned in the
chimera_config.yaml
file under thejob_submitter.class_name
Start with the following code snippet:
from chimera.pge_job_submitter import PgeJobSubmitter class NisarPgeJobSubmitter(PgeJobSubmitter): def __init__(self, context, run_config, pge_config_file, settings_file, wuid=None, job_num=None): PgeJobSubmitter.__init__(self, context, run_config, pge_config_file, settings_file, wuid=wuid, job_num=job_num)
The variables you have available throughout this subclass are:
Context - contents of
_context.json
of the SciFlo job. You can access it asself._context
in the precondition functionsPGE’s configuration - contents of the respective PGE’s configuration file. Can be accessed as
self._pge_config
Settings file - content of
settings.yaml file
accessible asself._settings
Run config - This is a the runconfig that the PGE job needs to run with. It can be accessed as
self._run_config
You can add any functions to this class that you want to run in addition to the nominal functionality of creating the job payload for the PGE job.