Sha256: a046f482e86221db3ae3ffb869abd03849ba3fa11cd09a4814884d863d412f51

Contents?: true

Size: 305 Bytes

Versions: 4

Compression:

Stored size: 305 Bytes

Contents

module FireAndForget
  module Command
    class SetPid < CommandBase

      attr_reader :task_name, :pid

      def initialize(task_name, pid)
        @task_name, @pid = task_name.to_sym, pid.to_i
      end

      def run
        FireAndForget::Server.pids[@task_name] = @pid
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fire_and_forget-0.3.2 lib/fire_and_forget/command/set_pid.rb
fire_and_forget-0.3.1 lib/fire_and_forget/command/set_pid.rb
fire_and_forget-0.3.0 lib/fire_and_forget/command/set_pid.rb
fire_and_forget-0.2.0 lib/fire_and_forget/command/set_pid.rb