Instantiate Plugins by plugin names

This commit is contained in:
Alex Ling
2020-07-21 17:21:21 +00:00
parent d184d6fba5
commit 7e4532fb14
2 changed files with 18 additions and 4 deletions

View File

@@ -45,6 +45,7 @@ class Queue
property success_count : Int32 = 0
property fail_count : Int32 = 0
property time : Time
property plugin_name : String?
def parse_query_result(res : DB::ResultSet)
@id = res.read String
@@ -59,6 +60,11 @@ class Queue
time = res.read Int64
@status = JobStatus.new status
@time = Time.unix_ms time
ary = @id.split("-")
if ary.size > 1
plugin_name = ary[0]
end
end
# Raises if the result set does not contain the correct set of columns