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

File-in-the-db checking and force processing #24

Open
1 of 2 tasks
korvinos opened this issue Jul 29, 2018 · 3 comments
Open
1 of 2 tasks

File-in-the-db checking and force processing #24

korvinos opened this issue Jul 29, 2018 · 3 comments
Assignees

Comments

@korvinos
Copy link
Member

korvinos commented Jul 29, 2018

Description

Ingesting and even more processing of ASAR files is a very time-consuming process. Many files go through multiple repetitions of the same procedures (as reprocessing) especially during the early steps of the application development. Thus a lot of time can be spared if we will be able to check to exist of a file in the database and go straight to next file if it does exist.

In the current version of the application, nansat_ingester handles these operations. Unfortunately, it is not an efficient way and requires a lot of processing steps be done before we really found if the file exists in the DB.

Along with that, we should be able to force processing of the file even if it already has been processed (for instance if we made some change in processing algorithm and want to renew the file without dumping the DB)

Solution

A method of checking the file in the database should be developed and initiated in the very beginning of any processing. Thus if a file has already been added to the DB it will raise a specific exception will be handled later. Also, a --force option should be added to the BaseCommand and if the exception was raised and force is True then keep processing else go to the next file

TODO

  • Add force flag to the BaseCommand
  • Develop a method which will check if the file has been already added in DB and raise the exception if so
@korvinos korvinos self-assigned this Jul 29, 2018
@mortenwh
Copy link
Contributor

mortenwh commented Jul 29, 2018 via email

@korvinos
Copy link
Member Author

korvinos commented Jul 29, 2018

It does not really matter because there is nothing to reuse

@mortenwh
Copy link
Contributor

The options (e.g., force) are already defined in Django-Geo-SPaaS ProcessingBaseCommand. Couldn't we just inherit from that command?

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

No branches or pull requests

2 participants