|
Lines 183-188
sub sftp_download {
Link Here
|
| 183 |
sub ingest { |
183 |
sub ingest { |
| 184 |
my ( $self, $msg_hash, @downloaded_files ) = @_; |
184 |
my ( $self, $msg_hash, @downloaded_files ) = @_; |
| 185 |
foreach my $f (@downloaded_files) { |
185 |
foreach my $f (@downloaded_files) { |
|
|
186 |
my $existing_file = $self->{schema}->resultset('EdifactMessage')->find( { filename => $f, } ); |
| 187 |
if ($existing_file) { |
| 188 |
carp "skipping ingest of $f : filename exists"; |
| 189 |
next; |
| 190 |
} |
| 186 |
$msg_hash->{filename} = $f; |
191 |
$msg_hash->{filename} = $f; |
| 187 |
my $file_content = |
192 |
my $file_content = |
| 188 |
read_file( "$self->{working_dir}/$f", binmode => ':raw' ); |
193 |
read_file( "$self->{working_dir}/$f", binmode => ':raw' ); |
| 189 |
- |
|
|