+* 2.1.49
+- Fixed Timeout problem
+== donghee yang <donghee.yang@samsung.com> 2013-10-08
* 2.1.48
- Fixed sdk-image name (TIZNE -> TIZEN)
== jonghwan park <jonghwan2.park@samsung.com> 2013-09-12
Source : dibs
-Version :2.1.48
+Version :2.1.49
Maintainer : taejun ha<taejun.ha@samsung.com>, jiil hyoun <jiil.hyoun@samsung.com>, donghyuk yang <donghyouk.yang@samsung.com>, donghee yang <donghee.yang@samsung.com>, sungmin kim <dev.sungmin.kim@samsung.com
Package : tizen-dibs-test
@server.log.info "Creating thread for canceling the job \"#{job.id}\""
Thread.new do
begin
+ @server.log.info "Job-Cancel-Thread started! \"#{job.id}\""
+
# job cancel
job.cancel
# cancel finished
+ @server.log.info "Updating job status to CANCELED... \"#{job.id}\""
job.status = "CANCELED"
save_job_status(job)
# call terminate process for job
+ @server.log.info "Calling CALLBACK, terminate... \"#{job.id}\""
job.terminate
- rescue => e
+ rescue Exception => e
@server.log.error e.message
@server.log.error e.backtrace.inspect
+ ensure
+ @server.log.info "Job-Cancel-Thread is finished! \"#{job.id}\""
end
end
end
$LOAD_PATH.unshift File.dirname(__FILE__)
require "BuildComm.rb"
require "BuildServerException.rb"
-
+require 'timeout'
class SocketJobRequestListener
def handle_job_request( req )
# read request
- req_line = req.gets
+ req_line = nil
+ begin
+ # Maximum response time from client is 10 sec
+ Timeout::timeout( 10 ) do
+ req_line = req.gets()
+ end
+ rescue Timeout::Error
+ req_line = nil
+ end
if req_line.nil? then return end
# accept