Skip to content
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

Zipgenotypingfiles fails when the file is missing #493

Open
tsujigiri opened this issue Apr 3, 2018 · 3 comments
Open

Zipgenotypingfiles fails when the file is missing #493

tsujigiri opened this issue Apr 3, 2018 · 3 comments

Comments

@tsujigiri
Copy link
Collaborator

What do we do? Delete the Genotype record and notify the user?

https://sentry.io/opensnp/opensnp/issues/436275621/

Errno::ENOENT: No such file or directory @ rb_file_s_lstat - /home/app/snpr/public/data/4979.genes-for-good.3516
  app/workers/zipgenotypingfiles.rb:27:in `block (2 levels) in perform'
    zipfile.add('user' + gen_file.user_id.to_s + '_file' + gen_file.id.to_s + '_yearofbirth' + gen_file.user.yearofbirth + '_sex' + gen_file.user.sex + '.' + gen_file.filetype + '.txt', ::Rails.root.to_s + '/public/data/' + gen_file.fs_filename)
  app/workers/zipgenotypingfiles.rb:26:in `each'
    @genotyping_files.each do |gen_file|
  app/workers/zipgenotypingfiles.rb:26:in `block in perform'
    @genotyping_files.each do |gen_file|
  app/workers/zipgenotypingfiles.rb:25:in `perform'
    Zip::File.open(::Rails.root.to_s + '/public/data/zip/' + phenotype_id.to_s + '.' + @time.to_s.gsub(' ', '_') + '.zip', Zip::File::CREATE) do |zipfile|
...
(31 additional frame(s) were not displayed)

No such file or directory @ rb_file_s_lstat - /home/app/snpr/public/data/4979.genes-for-good.3516
@philippbayer
Copy link
Member

How does this happen in the first place? Does this particular user/genotyping not exist anymore, but for some reason teh DB entry is there?

@tsujigiri
Copy link
Collaborator Author

That's what it is. No clue on how it happened. Maybe the deleting job failed and managed to delete the file but not the record...

@gedankenstuecke
Copy link
Member

It seems there are some of these in the latest uploads, one user complained via email about this phenomenon too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants