warning -> warn
This commit is contained in:
parent
fabb59e0dd
commit
c52e35b9c8
@ -137,7 +137,7 @@ stripe.api_version = app.config['STRIPE_API_VERSION']
|
|||||||
if app.config['MAIL_SERVER'] != "":
|
if app.config['MAIL_SERVER'] != "":
|
||||||
app.config['FLASK_MAIL_INSTANCE'] = Mail(app)
|
app.config['FLASK_MAIL_INSTANCE'] = Mail(app)
|
||||||
else:
|
else:
|
||||||
app.logger.warning("No MAIL_SERVER configured. capsul will simply print emails to stdout.")
|
app.logger.warn("No MAIL_SERVER configured. capsul will simply print emails to stdout.")
|
||||||
app.config['FLASK_MAIL_INSTANCE'] = StdoutMockFlaskMail()
|
app.config['FLASK_MAIL_INSTANCE'] = StdoutMockFlaskMail()
|
||||||
|
|
||||||
app.config['HTTP_CLIENT'] = MyHTTPClient(timeout_seconds=int(app.config['INTERNAL_HTTP_TIMEOUT_SECONDS']))
|
app.config['HTTP_CLIENT'] = MyHTTPClient(timeout_seconds=int(app.config['INTERNAL_HTTP_TIMEOUT_SECONDS']))
|
||||||
@ -150,9 +150,9 @@ if app.config['BTCPAY_URL'] != "":
|
|||||||
app.config['BTCPAY_CLIENT'] = btcpay.Client(api_uri=app.config['BTCPAY_URL'], pem=app.config['BTCPAY_PRIVATE_KEY'])
|
app.config['BTCPAY_CLIENT'] = btcpay.Client(api_uri=app.config['BTCPAY_URL'], pem=app.config['BTCPAY_PRIVATE_KEY'])
|
||||||
app.config['BTCPAY_ENABLED'] = True
|
app.config['BTCPAY_ENABLED'] = True
|
||||||
else:
|
else:
|
||||||
app.logger.warning(f"Can't reach BTCPAY_URL {app.config['BTCPAY_URL']}: Response status code: {response.status_code}. Capsul will work fine except cryptocurrency payments will not work.")
|
app.logger.warn(f"Can't reach BTCPAY_URL {app.config['BTCPAY_URL']}: Response status code: {response.status_code}. Capsul will work fine except cryptocurrency payments will not work.")
|
||||||
except:
|
except:
|
||||||
app.logger.warning("unable to create btcpay client. Capsul will work fine except cryptocurrency payments will not work. The error was: " + my_exec_info_message(sys.exc_info()))
|
app.logger.warn("unable to create btcpay client. Capsul will work fine except cryptocurrency payments will not work. The error was: " + my_exec_info_message(sys.exc_info()))
|
||||||
|
|
||||||
# only start the scheduler and attempt to migrate the database if we are running the app.
|
# only start the scheduler and attempt to migrate the database if we are running the app.
|
||||||
# otherwise we are running a CLI command.
|
# otherwise we are running a CLI command.
|
||||||
|
Loading…
Reference in New Issue
Block a user