Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
dda3cf0c
Commit
dda3cf0c
authored
Apr 25, 2014
by
Leo Gordon
Browse files
shift to_time 2 minutes into the future using Time::Piece and Time::Seconds
parent
053e54ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
scripts/lsf_report.pl
scripts/lsf_report.pl
+5
-4
No files found.
scripts/lsf_report.pl
View file @
dda3cf0c
...
...
@@ -15,6 +15,8 @@ BEGIN {
use
Getopt::
Long
;
use
Time::
Piece
;
use
Time::
Seconds
;
use
Bio::EnsEMBL::Hive::DBSQL::
DBAdaptor
;
use
Bio::EnsEMBL::Hive::
Utils
('
script_usage
');
use
Bio::EnsEMBL::Hive::Meadow::
LSF
;
...
...
@@ -77,7 +79,9 @@ sub main {
my
(
$from_time
,
$to_time
,
$workers_count
);
if
(
$our_interval
)
{
(
$from_time
,
$to_time
,
$workers_count
)
=
@$our_interval
{
'
min_born
',
'
max_died
',
'
workers_count
'
};
# TODO: increase $to_time by 2 minutes using Time::Piece
(
$from_time
,
$to_time
,
$workers_count
)
=
@$our_interval
{
'
min_born
',
'
max_died
',
'
workers_count
'
};
my
$to_timepiece
=
Time::
Piece
->
strptime
(
$to_time
,
'
%Y-%m-%d %H:%M:%S
')
+
2
*ONE_MINUTE
;
$to_time
=
$to_timepiece
->
strftime
('
%Y/%m/%d/%H:%M
');
}
else
{
die
"
Usage information for this meadow has already been loaded, exiting...
\n
";
}
...
...
@@ -93,9 +97,6 @@ sub main {
if
(
defined
$end_date
)
{
die
"
end_date must be in a format like '2012/01/25/13:46'
"
unless
$end_date
=~
/^\d{4}\/\d{2}\/\d{2}\/\d{2}:\d{2}$/
;
$to_time
=
$end_date
;
}
else
{
$to_time
=~
s/[- ]/\//g
;
$to_time
=~
s/:\d\d$//
;
}
warn
"
\t
from=
$from_time
, to=
$to_time
\n
";
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment