I installed the Watir-Webdriver script, which I want to tell the remote service:
puts "Starting..." b = Watir::Browser.new :ie puts "Started browser" puts "Setting status as non-idle" request = Net::HTTP::Post.new() url = URI(HOME + '/update_status') request.body = JSON.generate({ scrapeId: SCRAPE_ID, status: 'working' })
At the same time, node.js / express watir sends pinging, has the following endpoint:
app.post('/update_status', function(req, res) { redis.hset(req.body.scrapeId, 'status', req.body.status); if (req.body.status === 'finished') { redis.expire(req.body.scrapeId, SIX_HOURS); } res.send('response from post /update_status'); });
Question: Why is Net :: HTTP disconnected when /update_status ? Interestingly, if the server returns 404 (the endpoint does not exist), the Watir script continues normally.
Net::ReadTimeout is obviously a culture, but why?
source share