Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Small fixes in server

  • Loading branch information...
commit bcd909767357c1632e0ee8162139522f13b5db00 1 parent bb49f90
Bartosz Pranczke authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 server/server.rb
7 server/server.rb
View
@@ -24,7 +24,7 @@ class Domain
Email.auto_migrate! unless Email.storage_exists?
Domain.auto_migrate! unless Domain.storage_exists?
# First domain to crawl
- Domain.create(url: "http://192.168.56.1:4567", visited: false, visited_at: Time.now-6000)
+ Domain.create(url: "http://192.168.56.1:4567")
end
get '/' do
@@ -38,7 +38,7 @@ class Domain
content_type :json
if domain = Domain.first(visited_at: nil)
- else # If nothing lefts return the oldest domain to crawl
+ else # If nothing left return the oldest domain to crawl
domain = Domain.first(visited_at: Domain.min(:visited_at))
end
domain.update(visited_at: Time.now) unless domain.nil?
@@ -82,4 +82,5 @@ class Domain
@@ items
%h2== #{@items.count} gathered.
- @items.each do |i|
- %p= i['url']
+ %ul
+ %li= i['url']
Please sign in to comment.
Something went wrong with that request. Please try again.