Skip to content

Commit

Permalink
avoid variable shadowing (getredash#4050)
Browse files Browse the repository at this point in the history
  • Loading branch information
Omer Lachish authored and harveyrendell committed Nov 14, 2019
1 parent 5576d3e commit 7266efd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions redash/tasks/failure_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def comment_for(failure):

@celery.task(name="redash.tasks.send_aggregated_errors")
def send_aggregated_errors():
for key in redis_connection.scan_iter(key("*")):
user_id = re.search(r'\d+', key).group()
for k in redis_connection.scan_iter(key("*")):
user_id = re.search(r'\d+', k).group()
send_failure_report(user_id)


Expand Down
2 changes: 1 addition & 1 deletion tests/tasks/test_failure_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from tests import BaseTestCase
from redash import redis_connection, models, settings
from redash.tasks.failure_report import notify_of_failure, send_failure_report, send_aggregated_errors, key
from redash.tasks.failure_report import notify_of_failure, send_failure_report, key
from redash.utils import json_loads

class TestSendAggregatedErrorsTask(BaseTestCase):
Expand Down

0 comments on commit 7266efd

Please sign in to comment.