mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 01:25:16 +00:00
7fb33e3ebb
* initial work on e-mail report for failed queries * send failure report only for scheduled queries and not for adhoc queries * add setting to determine if to send failure reports * add setting to determine interval of aggregated e-mail report * html templating of scheduled query failure report * break line * support timeouts for failure reports * aggregate errors within message and warn if approaching threshold * handle errors in QueryExecutor.run instead of on_failure * move failure report to its own module * indicate that failure count is since last report * copy changes * format with <code> * styling, copy and add a link to the query instead of the query text * separate reports with <hr> * switch to UTC * move <h2> to actual e-mail subject * add explicit message for SoftTimeLimitExceeded * fix test to use soft time limits * default query failure threshold to 100 * use base_url from utils * newlines. newlines everywhere. * remove redundant import * apply new design for failure report * use jinja to format the failure report * don't show comment block if no comment is provided * don't send emails if, for some reason, there are no available errors * subtract 1 from failure count, because the first one is represented by 'Last failed' * don't show '+X more failures' if there's only one * extract subject to variable * format as text, while we're at it * allow scrolling for long exception messages * test that e-mails are scheduled only when beneath limit * test for indicating when approaching report limits + refactor * test that failures are aggregated * test that report counts per query and reason * test that the latest failure occurence is reported * force sending reports for testing purposes * Update redash/templates/emails/failures.html Co-Authored-By: Ran Byron <ranbena@gmail.com> * Update redash/templates/emails/failures.html Co-Authored-By: Ran Byron <ranbena@gmail.com> * Update redash/tasks/failure_report.py * add org setting for email reports * remove logo from failure report email * correctly use the organization setting for sending failure reports * use user id as key for failure reports data structure * Update redash/tasks/failure_report.py Co-Authored-By: Arik Fraimovich <arik@arikfr.com> * build comments while creating context for e-mail templates * figure out the base url when creating the e-mail * no need to expire pending failure report keys as they are deleted anyway when sent * a couple of CodeClimate changes * refactor key creationg to a single location * refactor tests to send e-mail from a single function * use beat to schedule a periodic send_aggregated_errors task instead of using countdown per email * remove pending key as it is no longer required when a periodic task picks up the reports to send * a really important blank line. REALLY important. * Revert "a really important blank line. REALLY important." This reverts commit c7d8ed89721434cb4eeb03a7360472d9dfe68af2. * a really important blank line. REALLY important. It is the best blank line. * don't send failure emails to disabled users |
||
---|---|---|
.. | ||
handlers | ||
models | ||
query_runner | ||
serializers | ||
tasks | ||
utils | ||
__init__.py | ||
factories.py | ||
test_authentication.py | ||
test_cli.py | ||
test_configuration.py | ||
test_handlers.py | ||
test_models.py | ||
test_permissions.py | ||
test_utils.py |