Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
ef5ca18a
Commit
ef5ca18a
authored
Aug 15, 2014
by
Feanil Patel
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1416 from edx/feanil/resolution_error_in_aws
Handle resolution failures for sqs.
parents
6de028d8
8be4563f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
playbooks/callback_plugins/sqs.py
+10
-1
No files found.
playbooks/callback_plugins/sqs.py
View file @
ef5ca18a
...
...
@@ -20,6 +20,7 @@ import os
import
sys
import
time
import
json
import
socket
try
:
import
boto.sqs
from
boto.exception
import
NoAuthHandlerFound
...
...
@@ -132,4 +133,12 @@ class CallbackModule(object):
# only keep the last 20 or so lines to avoid payload size errors
if
len
(
payload
[
msg_type
][
'stdout_lines'
])
>
20
:
payload
[
msg_type
][
'stdout_lines'
]
=
[
'(clipping) ... '
]
+
payload
[
msg_type
][
'stdout_lines'
][
-
20
:]
self
.
sqs
.
send_message
(
self
.
queue
,
json
.
dumps
(
payload
))
while
True
:
try
:
self
.
sqs
.
send_message
(
self
.
queue
,
json
.
dumps
(
payload
))
break
except
socket
.
gaierror
as
e
:
print
'socket.gaierror will retry: '
+
e
time
.
sleep
(
1
)
except
Exception
as
e
:
raise
e
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment