summaryrefslogtreecommitdiff
path: root/app/workers
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-02-04 22:20:59 -0700
committermo khan <mo@mokhan.ca>2015-02-04 22:20:59 -0700
commitf00a33df86a42358d36eec46e19508ea20361892 (patch)
tree2bc00ac7e978b2e9dcdda8736bd32b469bc6b9a8 /app/workers
parentfe98744802e9a029c9656c66bdfa34c551ac0ca2 (diff)
publish command to agent queue to analzye file.
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/cloud_queries.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/workers/cloud_queries.rb b/app/workers/cloud_queries.rb
index e351152..3f4c6e1 100644
--- a/app/workers/cloud_queries.rb
+++ b/app/workers/cloud_queries.rb
@@ -12,12 +12,11 @@ class CloudQueries
disposition = Disposition.find_by(fingerprint: fingerprint)
if disposition.nil?
- # publish command to fetch file from agent
- #publish(JSON.generate({
- #command: :request_analysis,
- #agent_id: attributes["agent_id"],
- #fingerprint: fingerprint,
- #}), to_queue: "worker.commands")
+ publish(JSON.generate({
+ command: :request_analysis,
+ agent_id: attributes["agent_id"],
+ fingerprint: fingerprint,
+ }), routing_key: "malwer.agents.#{attributes["agent_id"]}")
end
ack!