Skip to content

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

Open
ondrejbartas wants to merge 19 commits into
masterfrom
fix-sidekiq5
Open

Update Manager and stats to correctly store information about processing#1
ondrejbartas wants to merge 19 commits into
masterfrom
fix-sidekiq5

Conversation

@ondrejbartas
Copy link
Copy Markdown
Member

…ing jobs

Comment thread lib/exq/manager/server.ex Outdated
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
Copy Markdown
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

Comment thread lib/exq/redis/job_stat.ex Outdated
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
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

remove this

Comment thread lib/exq/redis/job_stat.ex
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
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

leave this!

Comment thread lib/exq/redis/job_stat.ex Outdated
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
Copy Markdown
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

Comment thread lib/exq/redis/job_stat.ex Outdated
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
Copy Markdown
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