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

Logging improperly configured? #1

Closed
jonsimington opened this issue Jun 29, 2015 · 3 comments
Closed

Logging improperly configured? #1

jonsimington opened this issue Jun 29, 2015 · 3 comments

Comments

@jonsimington
Copy link

I'm getting this message when my code has a syntax error, instead of a proper error being output to the console.

No handlers could be found for logger "apscheduler.executors.default"

I'm not sure if this is on your end, or APScheduler's end.

@viniciuschiele
Copy link
Owner

Hi @jonsimington

This is on APScheduler's end but I think your logging is not configured properly.

Have you set up the logging library or are you using the default configuration?

Cheers!

@jonsimington
Copy link
Author

I'm not actually logging anything myself. This occurs when there is some sort of python error in the function that flask-apscheduler is calling from its config (be it syntactical or referential).

While I have you here, is there any documentation on what types of triggers are available, other than cron? I need to have the function executed every 5 minutes, not every hour on the 5 minute mark, which is what the cron type provides.

EDIT: Nevermind. It uses the APScheduler triggers.

Thanks!

@viniciuschiele
Copy link
Owner

I can not reproduce this issue, I tried using this example https://github.com/viniciuschiele/flask-apscheduler/blob/master/examples/jobs.py and I have raised an exception in the method job1, the error was displayed on the console.

The triggers available are: interval, date and cron.

Example of job that executes every 5 minutes:

{
    'id': 'job1',
    'func': 'job1',
    'args': (1, 2),
    'trigger': {
        'type': 'interval'
        'minutes': 5
    }
}

I did not write the documentation yet, but you can take a look at the APScheduler documentation.

https://apscheduler.readthedocs.org/en/latest/modules/triggers/cron.html
https://apscheduler.readthedocs.org/en/latest/modules/triggers/interval.html
https://apscheduler.readthedocs.org/en/latest/modules/triggers/date.html

I'm using the same names for the parameters.

Cheers!

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