Skip to content

Conversation

@ondrejbartas
Copy link
Member

…ing jobs

worker_init = [
["SADD", JobQueue.full_key(state.namespace, "processes"), name],
["HSET", name, "quiet", "false"],
["HSET", name, "info", Poison.encode!(%{ hostname: state.node_id, started_at: state.started_at, pid: "#{string_pid(state)}", concurrency: 5, queues: state.queues})],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix concurency to get real value

def add_process(redis, namespace, process_info, serialized_process \\ nil) do
instr = add_process_commands(namespace, process_info, serialized_process)
Connection.qp!(redis, instr)
IO.inspect(instr)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

end
def add_process(redis, namespace, process_info, serialized_process \\ nil) do
instr = add_process_commands(namespace, process_info, serialized_process)
Connection.qp!(redis, instr)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave this!

processes = JobQueue.full_key(namespace, "processes")
instr = Connection.smembers!(redis, processes)
|> Enum.filter(fn(key) -> key =~ "#{hostname}:" end)
|> Enum.map(fn(key) -> ["SREM", processes, key] end)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove also workers

end

defp supervisor_worker_name(namespace, process_info) do
JobQueue.full_key(namespace, "#{process_info.hostname}:#{:erlang.pid_to_list(:sys.get_state(Exq).pid)}")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get pid of main process by different way

@ondrejbartas ondrejbartas force-pushed the fix-sidekiq5 branch 3 times, most recently from fc28429 to adbd0d7 Compare October 11, 2017 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants