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
bc7449f9
Commit
bc7449f9
authored
Aug 14, 2014
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle resolution failures for sqs.
parent
f5289cc6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
playbooks/callback_plugins/sqs.py
+8
-1
No files found.
playbooks/callback_plugins/sqs.py
View file @
bc7449f9
...
...
@@ -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,10 @@ 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
)
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