Skip to content
Snippets Groups Projects
Verified Commit 99b3bb2a authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Indexer bugfix

parent 622cd058
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ image: docker:19.03.12
variables:
DOCKER_TLS_CERTDIR: "/certs"
IMAGE_VER: 1.8.1
IMAGE_VER: 1.8.2
services:
- docker:19.03.12-dind
......
......@@ -5,12 +5,10 @@ use warnings;
use FindBin qw($Bin);
use lib "$Bin/../lib";
use File::Copy;
use Mojo::Pg;
use constant YAMDI => '/usr/bin/yamdi';
#use PiTube::Schema;
use Mojo::Pg;
my $pg = Mojo::Pg->new
->dsn($ENV{DB_DSN})
->username($ENV{DB_USERNAME})
......@@ -26,6 +24,7 @@ my $records = $pg->db->query(qq[
RECORD:
while (my $record = $records->hash) {
next RECORD if ! -f $record->{path};
next RECORD if -f $record->{path} . '.idx';
print "Indexing $record->{path}\n";
......@@ -42,5 +41,4 @@ while (my $record = $records->hash) {
{id => $record->{id}},
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment