method
start_job
v1_9_3_125 -
Show latest stable
- Class:
Shell::ProcessController
start_job(command = nil)public
start a job
# File lib/shell/process-controller.rb, line 153
def start_job(command = nil)
@jobs_sync.synchronize(:EX) do
if command
return if command.active?
@waiting_jobs.delete command
else
command = @waiting_jobs.shift
# command.notify "job(%id) pre-start.", @shell.debug?
return unless command
end
@active_jobs.push command
command.start
# command.notify "job(%id) post-start.", @shell.debug?
# start all jobs that input from the job
for job in @waiting_jobs.dup
start_job(job) if job.input == command
end
# command.notify "job(%id) post2-start.", @shell.debug?
end
end Related methods
- Instance methods
- active_job?
- active_jobs
- active_jobs_exist?
- add_schedule
- jobs
- jobs_exist?
- kill_job
- sfork
- start_job
- terminate_job
- wait_all_jobs_execution
- waiting_job?
- waiting_jobs
- waiting_jobs_exist?
- Class methods
- activate
- active_process_controllers
- block_output_synchronize
- each_active_object
- inactivate
- new
- wait_to_finish_all_process_controllers