lib/rest-ftp-daemon/api/root.rb in rest-ftp-daemon-0.202.2 vs lib/rest-ftp-daemon/api/root.rb in rest-ftp-daemon-0.210.0
- old
+ new
@@ -31,12 +31,14 @@
####### HELPERS
helpers do
- def info message, context = {}
- Root.logger.info_with_id message, context
+ def info message, lines = []
+ Root.logger.info_with_id message,
+ lines: lines,
+ origin: self.class.to_s
end
def api_error exception
{
:error => exception.message,
@@ -46,16 +48,9 @@
def render name, values={}
template = File.read("#{APP_LIBS}/views/#{name.to_s}.haml")
haml_engine = Haml::Engine.new(template)
haml_engine.render(binding, values)
- end
-
- def job_find job_id
- return nil if ($queue.all_size==0)
-
- # Find a job with exactly this id, or prefixed if not found
- $queue.find_by_id(job_id) || $queue.find_by_id(job_id, true)
end
end
end