lib/legion/extensions/tasker/runners/fetch_delayed.rb in lex-tasker-0.1.2 vs lib/legion/extensions/tasker/runners/fetch_delayed.rb in lex-tasker-0.1.3

- old
+ new

@@ -7,12 +7,13 @@ tasks_pushed = [] log.debug "tasks.count = #{tasks.count}" tasks.each do |task| relationship = task.relationship next if !task.relationship.nil? && Time.now < task.values[:created] + relationship.values[:delay] - next if Time.now < task.values[:created] + task.values[:delay] + # next if Time.now < task.values[:created] + task.values[:delay] + subtask = Legion::Transport::Messages::SubTask.new( relationship_id: relationship.values[:id], chain_id: relationship.values[:chain_id], trigger_runner_id: relationship.trigger.runner.values[:id], trigger_function_id: relationship.values[:trigger_id], @@ -24,11 +25,10 @@ transformation: relationship.values[:transformation], # debug: relationship.values[:debug], task_id: task.values[:id] # results: task.values[:payload] ) - log.debug 'publishing task' subtask.publish task.update(status: 'conditioner.queued') tasks_pushed.push(task.values[:id]) rescue StandardError => e task.update(status: 'task.push_exception') @@ -41,10 +41,9 @@ Legion::Logging.error e.message Legion::Logging.error e.backtrace end def push(**_opts) - log.debug 'push has been called' Legion::Extensions::Tasker::Transport::Messages::FetchDelayed.new.publish { success: true } end end end