cloudwatch: global before reading queue
Technically, it isn't necessary to use the global keyword before reading a global value, only modifying it. However, in this case it leaves a pretty annoying log line.
This commit is contained in:
parent
935db5c766
commit
ef8d320c95
1 changed files with 1 additions and 1 deletions
|
@ -12,8 +12,8 @@ def get_queue(app):
|
|||
"""
|
||||
Returns a queue to the CloudWatchSender. If a queue/sender do not exist, creates them.
|
||||
"""
|
||||
global queue
|
||||
if queue is None:
|
||||
global queue
|
||||
access_key = app.config.get('QUEUE_METRICS_AWS_ACCESS_KEY')
|
||||
secret_key = app.config.get('QUEUE_METRICS_AWS_SECRET_KEY')
|
||||
queue = Queue()
|
||||
|
|
Reference in a new issue