mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 08:54:23 -05:00
Update BaseBackgroundHelper.rb
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
module BaseBackgroundHelper
|
||||
|
||||
# abstact methods to be overriden
|
||||
def run (results); raise "run method is missing"; end
|
||||
def results (results); raise "results method is missing"; end
|
||||
def success_path; raise "success_path is missing"; end
|
||||
def error_path; raise "error_path is missing"; end
|
||||
|
||||
@@ -18,8 +18,8 @@ module BaseBackgroundHelper
|
||||
def self.perform(args)
|
||||
job = Job.find_by_id(args[:job_id])
|
||||
|
||||
# Call the abstact method passing the service
|
||||
run(Qbo.get_base(args[:type]).service.fetch_by_id(args[:id]))
|
||||
# Call the abstact method passing the results
|
||||
results(Qbo.get_base(args[:type]).service.fetch_by_id(args[:id]))
|
||||
|
||||
job.change_status("succes")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user