Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update linkextractor.rb for live logs. #13

Open
wants to merge 26 commits into
base: step6
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
64f6e25
Updated main README
ibnesayeed Nov 29, 2017
e9ba00d
Step0 added
ibnesayeed Nov 29, 2017
78d6adf
Step1 added
ibnesayeed Nov 29, 2017
932506a
Step2 added
ibnesayeed Nov 29, 2017
49a27ef
Step3 added
ibnesayeed Nov 29, 2017
a5b6764
Step4 added
ibnesayeed Nov 29, 2017
6de60c3
Step5 added
ibnesayeed Nov 29, 2017
5a3109c
Step6 added
ibnesayeed Nov 29, 2017
4e45f37
Fix plurality
machawk1 Nov 29, 2017
021afed
Merge pull request #1 from machawk1/patch-1
ibnesayeed Nov 29, 2017
00ce54a
Disable path traversal protection and report full URI
ibnesayeed Sep 22, 2018
256ca66
Add tag to base images
ibnesayeed Sep 25, 2018
8634683
Parametrize redis connection using environment variable
ibnesayeed Sep 26, 2018
1d6033a
Change tags of images in compose file
ibnesayeed Sep 26, 2018
dd3e73f
Add a branch synchronizer script
ibnesayeed Sep 26, 2018
bd86b5e
Cleanup in the branch synchronizer script
ibnesayeed Sep 26, 2018
39ed016
Organized README
avinashdesireddy Feb 20, 2019
cb03e11
Apply suggestions from code review
ibnesayeed Feb 21, 2019
7aeffad
Merge pull request #5 from avinashdesireddy/master
ibnesayeed Feb 21, 2019
0ef0c2f
Set Ruby image to Ruby:2.6 due to issues with bundle install in the l…
laurensknoll Jan 2, 2020
18f2ed8
Merge pull request #8 from laurensknoll/master
ibnesayeed Jan 2, 2020
ab14478
Improve documentation wordings
ibnesayeed Oct 31, 2020
fb3bcad
Merge pull request #12 from ibnesayeed/docs
ibnesayeed Oct 31, 2020
467d4d1
Modify extraction.log to write and close file for each query.
thunt-career Mar 6, 2023
f9facc2
Modify extraction.log to write and close file for each query.
thunt-career Mar 6, 2023
81f2bfa
Modify extraction.log to write and close file for each query.
thunt-career Mar 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/linkextractor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
redis = Redis.new(url: ENV["REDIS_URL"] || "redis://localhost:6379")

Dir.mkdir("logs") unless Dir.exist?("logs")
cache_log = File.new("logs/extraction.log", "a")

get "/" do
"Usage: http://<hostname>[:<prt>]/api/<url>"
Expand All @@ -29,7 +28,9 @@
redis.set(url, jsonlinks)
end

cache_log = File.open("logs/extraction.log", "a")
cache_log.puts "#{Time.now.to_i}\t#{cache_status}\t#{url}"
cache_log.close

status 200
headers "content-type" => "application/json"
Expand Down