<commit_before>#!/usr/local/ensembl/bin/perl -w

use strict;
use DBI;
use Getopt::Long;
use Bio::EnsEMBL::Hive;

my ($help, $url);

GetOptions('help'           => \$help,
           'url=s'          => \$url,
          );

if ($help) { usage(); }

my $job = Bio::EnsEMBL::Hive::URLFactory->fetch($url);
die("Unable to fecth job via url $url\n") unless($job);

$job->print_job;
$job->update_status('READY');

exit(0);


#######################
#
# subroutines
#
#######################

sub usage {
  print "ehive_unblock.pl [options]\n";
  print "  -help                  : print this help\n";
  print "  -url <url string>      : url defining hive job\n";
  print "ehive_unblock.pl v1.7\n";
  
  exit(1);  
}


<commit_msg>added more messages for fail cases<commit_after>#!/usr/local/ensembl/bin/perl -w

use strict;
use DBI;
use Getopt::Long;
use Bio::EnsEMBL::Hive;

my ($help, $url);

GetOptions('help'           => \$help,
           'url=s'          => \$url,
          );

if ($help) { usage(); }
unless($url) { printf("must specifiy -url\n\n"); usage(); }

my $job = Bio::EnsEMBL::Hive::URLFactory->fetch($url);
unless($job and $job->isa('Bio::EnsEMBL::Hive::AnalysisJob')) {
  printf("Unable to fetch job via url: $url\n\n");
  usage();
}

$job->print_job;
$job->update_status('READY');

exit(0);


#######################
#
# subroutines
#
#######################

sub usage {
  print "ehive_unblock.pl [options]\n";
  print "  -help                  : print this help\n";
  print "  -url <url string>      : url defining hive job\n";
  print "ehive_unblock.pl v1.7\n";
  
  exit(1);  
}



{'fraction_non_alphanumeric': 0.23889931207004378, 'fraction_numerical': 0.0050031269543464665, 'mean_word_length': 3.010025062656642, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '738865', 'n_tokens_mistral': 626, 'n_tokens_neox': 600, 'n_words': 127}