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

apero_processing asks for user input when no files are present even when TRIGGER_RUN is true #776

Open
cusher opened this issue Aug 20, 2024 · 2 comments

Comments

@cusher
Copy link
Collaborator

cusher commented Aug 20, 2024

On branch: v0.7.289-stable-test

Documentation seems to indicate that setting TRIGGER_RUN true, or passing in trigger=True should prevent this, but that doesn't seem to be the case.

Able to work around it for now by modifying drs_processing.py, where I changed the following:

         # deal with empty database (after conditions)
        if idb_len == 0:

to

         # deal with empty database (after conditions)
         if idb_len == 0 and 'TRIGGER_RUN' not in params:
@cusher cusher changed the title apero_processing asks for user input even when TRIGGER_RUN is true apero_processing asks for user input when no files are present even when TRIGGER_RUN is true Aug 20, 2024
@njcuk9999
Copy link
Owner

its probably not worth continuing if the database is empty.

What would the best response be?

I guess the prompt is a problem so we can not have the user prompt, but maybe keep the exception to be caught higher up?
Or would you rather the code just stopping there without an exception?

@cusher
Copy link
Collaborator Author

cusher commented Aug 21, 2024

The way I currently have things set up, it doesn't matter too much one way or the other. The main thing is have it able to run non-interactively i.e. so it won't hang when there is no user input.

But in terms of what makes most sense, I could see considering it a "normal use case" for the trigger mode to run on an empty directory e.g. if you are running it on a specific night directory before files have started coming in for that night. So if you consider that case valid/supported, it probably shouldn't throw an exception there would be my thought.

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

2 participants