-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Conversation
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})], |
There was a problem hiding this comment.
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
lib/exq/redis/job_stat.ex
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
lib/exq/redis/job_stat.ex
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leave this!
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove also workers
lib/exq/redis/job_stat.ex
Outdated
@@ -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)}") |
There was a problem hiding this comment.
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
fc28429
to
adbd0d7
Compare
[skipci]
Remove password from error logging
make redis module name and start_link args configurable
add note about sentinel support
adbd0d7
to
3aa19a9
Compare
3aa19a9
to
28da15d
Compare
650550c
to
e7c2058
Compare
34363ce
to
ea33b33
Compare
ea33b33
to
2919ebc
Compare
f01e84f
to
ab88ee5
Compare
ab88ee5
to
94fdc05
Compare
…ing jobs