-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced a textual listing of instruments. #832
Conversation
Added a column for recently used staging servers so that the loaders can easily spot instruments, which write to the same server.
9649c4d
to
2b42748
Compare
... to reflect the nature of the displayed data.
lib/npg/model/instrument.pm
Outdated
ORDER BY date DESC]; | ||
my $dbh = $self->util->dbh(); | ||
# Four rather than two latest runs since NovaSeq(X) instruments have | ||
# two sides, which write to the same staging server. | ||
my $rows = $dbh->selectall_arrayref($query, {RaiseError => 1, MaxRows => 4}, | ||
$self->id_instrument(), $run_status); | ||
my @globs = uniq map { $_->[0] } @{$rows}; | ||
# We do not need more that two unique globs. | ||
while (scalar @globs > 2) { | ||
pop @globs | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ORDER BY date DESC]; | |
my $dbh = $self->util->dbh(); | |
# Four rather than two latest runs since NovaSeq(X) instruments have | |
# two sides, which write to the same staging server. | |
my $rows = $dbh->selectall_arrayref($query, {RaiseError => 1, MaxRows => 4}, | |
$self->id_instrument(), $run_status); | |
my @globs = uniq map { $_->[0] } @{$rows}; | |
# We do not need more that two unique globs. | |
while (scalar @globs > 2) { | |
pop @globs | |
} | |
ORDER BY date DESC | |
LIMIT 4 ]; | |
my $dbh = $self->util->dbh(); | |
# Four rather than two latest runs since NovaSeq(X) instruments have | |
# two sides, which write to the same staging server. | |
my $rows = $dbh->selectall_arrayref($query, {RaiseError => 1, MaxRows => 4}, | |
$self->id_instrument(), $run_status); | |
my @globs = uniq map { $_->[0] } @{$rows}; | |
# We do not need more that two unique globs. | |
while (scalar @globs > 2) { | |
pop @globs | |
} |
Probably not worth it! (Thinking aloud...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is to limit to 4 rows, then it is aleady done by MaxRows => 4
How about finding the last two staging areas used rather than the staging areas for last two runs?
|
Possible. Having talked to @jmtcsngr I tried to fetch recently used staging areas rather than two last used |
82962ae
to
5efbb3a
Compare
Added a column for recently used staging servers so that the loaders can easily spot instruments, which write to the same server.