Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Manager and stats to correctly store information about processing #1

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

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

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)
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

@@ -120,6 +147,10 @@ defmodule Exq.Redis.JobStat do
{:ok, failures, successes}
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.

4 participants