Skip to content

Commit

Permalink
Suppress "No such file or directory" output
Browse files Browse the repository at this point in the history
The full message is “cat: /proc/1/cgroup: No such file or directory”.
  • Loading branch information
mkozono committed May 17, 2016
1 parent 050b5bd commit dd0ab6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/active_elastic_job/rack/sqs_message_consumer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class SqsMessageConsumer
CONTENT_TYPE = 'application/json'.freeze
CONTENT_TYPE_HEADER_NAME = 'Content-Type'.freeze
OK_RESPONSE_CODE = '200'.freeze
INSIDE_DOCKER_CONTAINER = `cat /proc/1/cgroup` =~ /docker/
INSIDE_DOCKER_CONTAINER = `[ -f /proc/1/cgroup ] && cat /proc/1/cgroup` =~ /docker/
DOCKER_HOST_IP = "172.17.0.1".freeze

def initialize(app) #:nodoc:
Expand Down

0 comments on commit dd0ab6c

Please sign in to comment.