lib/tracer_client/client.rb in tracer_client-0.1.2 vs lib/tracer_client/client.rb in tracer_client-0.1.3
- old
+ new
@@ -16,16 +16,20 @@
Thread.current[:tracer_params] = nil
end
def log(notice)
- Tracer::Server.log(notice.merge(request_log_data))
+ Thread.new do
+ Tracer::Server.log(notice.merge(request_log_data))
+ end
end
def log_changes(changes)
- Tracer::Server.log_changes(changes.merge(request_changes_data))
+ Thread.new do
+ Tracer::Server.log_changes(changes.merge(request_changes_data))
+ end
end
private
@@ -94,29 +98,9 @@
def request_changes_data
request_data
end
- end
-
-
- private
-
-
- class LogJob
- include SuckerPunch::Job
-
- def perform(notice)
- Tracer::Server.log(notice)
- end
- end
-
- class LogChangesJob
- include SuckerPunch::Job
-
- def perform(changes)
- Tracer::Server.log_changes(changes)
- end
end
end
end