« blib/lib/HPC/Runner/Command/single_node.pm
↑ Summary
blib/lib/HPC/Runner/Command/Logger/Loggers.pm »
| 1 | package HPC::Runner::Command::submit_jobs::Utils::Scheduler::Batch; | ||
| 2 | |||
| 3 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use Moose::Util::TypeConstraints; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | #cmd_count = Int | ||
| 7 | #job_deps = ArrayRef | ||
| 8 | #batch_str = Str | ||
| 9 | #job = Str | ||
| 10 | #cmds = ArrayRef | ||
| 11 | #batch_tags = ArrayRef | ||
| 12 | #scheduler_index = Hashref[ArrayRef] | ||
| 13 | #array_deps = ArrayRef <- Do I need this? | ||
| 14 | |||
| 15 | #TODO batch_tags is going to be batch_tags and batch_dep_tags | ||
| 16 | |||
| 17 | #Begin Example | ||
| 18 | #my $href = { | ||
| 19 | #'cmds' => [ | ||
| 20 | #'#TASK tags=Sample1 | ||
| 21 | ##TASK deps=Sample1 | ||
| 22 | #blastx -db env_nr -query Sample1 | ||
| 23 | #' | ||
| 24 | #], | ||
| 25 | #'cmd_count' => '1', | ||
| 26 | #'job_deps' => ['pyfasta'], | ||
| 27 | #'batch_tags' => ['Sample1'], | ||
| 28 | #'batch_str' => '#TASK tags=Sample1 | ||
| 29 | ##TASK deps=Sample1 | ||
| 30 | #blastx -db env_nr -query Sample1 | ||
| 31 | #', | ||
| 32 | #'job' => 'blastx_scratch', | ||
| 33 | #'scheduler_index' => { 'pyfasta' => ['0'], }, | ||
| 34 | #'array_deps' => [ [ '1237_7', '1234_1' ], ], | ||
| 35 | #}; | ||
| 36 | #End Example | ||
| 37 | |||
| 38 | has batch_tags => ( | ||
| 39 | traits => ['Array'], | ||
| 40 | is => 'rw', | ||
| 41 | isa => 'ArrayRef', | ||
| 42 | 0 | ▶ | default => sub { [] }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 43 | 1 | handles => { | |
| 44 | all_batch_tags => 'elements', | ||
| 45 | add_batch_tags => 'push', | ||
| 46 | join_batch_tags => 'join', | ||
| 47 | has_batch_tags => 'count', | ||
| 48 | clear_batch_tags => 'clear', | ||
| 49 | }, | ||
| 50 | ); | ||
| 51 | |||
| 52 | 1 | has 'cmd_count' => ( | |
| 53 | is => 'rw', | ||
| 54 | required => 1, | ||
| 55 | ); | ||
| 56 | |||
| 57 | 1 | has 'cmd_start' => ( | |
| 58 | is => 'rw', | ||
| 59 | required => 1, | ||
| 60 | ); | ||
| 61 | |||
| 62 | 1 | has 'job' => ( | |
| 63 | is => 'rw', | ||
| 64 | isa => 'Str', | ||
| 65 | required => 0, | ||
| 66 | ); | ||
| 67 | |||
| 68 | 1 | has 'scheduler_id' => ( | |
| 69 | is => 'rw', | ||
| 70 | isa => 'Str', | ||
| 71 | required => 0, | ||
| 72 | ); | ||
| 73 | |||
| 74 | has 'scheduler_index' => ( | ||
| 75 | isa => 'HashRef', | ||
| 76 | is => 'rw', | ||
| 77 | 0 | ▶ | default => sub { return {} }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 78 | 1 | documentation => | |
| 79 | q(Get the job dependency, and the index of the job scheduler id that corresponds to that batch), | ||
| 80 | ); | ||
| 81 | |||
| 82 | 1 | 1; | |