-
Notifications
You must be signed in to change notification settings - Fork 113
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
Error logging only works when not inside of a function #67
Comments
Hey, just a guess based on what i saw before in #31. When run() is executed triggered from cron the |
Hi @kraiz ,
should fix it? What do you think the directory should be? The directory of the app? I will try it directly tomorrow morning. Best, |
Ah, just saw the logging config and thought there's a problem with it. rereaded it and you didnt see the raised error...try adding a suffix param to capture the output into a (absolutely referenced) file like in #61. This should provide further information and guide you. |
I modified my
For the case that did NOT report any error, with the
For the other case, where the
I am not quite sure what to learn from this, but it might look like the reporting in the second case runs through Django, in the first case, however, the reporting does not run through Django? What do you think, @kraiz ? |
A temporary solution for me is this
|
I would call this expected. The first (raise-inside) log shows the logging output of |
Hm okay. So it looks like my
at the beginning to my Thank you very much for your help! |
For CWD problem i suggest setting
|
So, after hours of wonder where my Exceptions were going (I still don't know btw), I manage to redirect them putting the general try catch around the method:
I finally capture the silent bug. This is just obvious once you see it, but not when you are wondering what is happening: is it crontabs? is it django-cron? is it cron sending my exceptions to the mail? maybe syslog? is Until I did the above, I managed to see the exception and fix my code. Is there any possible way to avoid that these exceptions dissapper in limbo. I am still wondering where do they actually go when I don't use the |
Environment & Versions
Settings
django-crontab
settings:Details
I have the following 2
cron.py
files:and
The first snippet reports the error, the second one does not. I use Sentry for error logging. Do you have any idea, why that happens?
Thank you very much for your help!
The text was updated successfully, but these errors were encountered: