Skip to content

Commit 2fa89a7

Browse files
authored
Merge pull request #1535 from coderdojo-japan/add-conpass-api-delay
connpass の robots.txt に合わせた API 呼び出しにするために、Sleep を入れた
2 parents 6bce392 + 8358f05 commit 2fa89a7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/event_service/client.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ def connection_for(endpoint)
2323

2424
f.adapter Faraday.default_adapter
2525
end
26+
# connpass は https://connpass.com/robots.txt を守らない場合は、アクセス制限を施すので、下記の sleep を入れるようにした https://connpass.com/about/api/
27+
sleep 5 if endpoint.include?(EventService::Providers::Connpass::ENDPOINT)
2628
end
2729
end
2830
end

0 commit comments

Comments
 (0)