Skip to content

Commit

Permalink
change orphaned events task
Browse files Browse the repository at this point in the history
  • Loading branch information
wendelfabianchinsamy committed Jul 23, 2024
1 parent 16a320c commit 9279e25
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/jobs/delete_orphaned_gbif_events_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
class DeleteOrphanedGbifEventsJob < ApplicationJob
queue_as :lupo_background

def perform(env, query)
def perform(env, options)
label = "DeleteOrphanedGbifEventsJob_#{Time.now.utc.strftime("%d%m%Y%H%M%S")}"

Rails.logger.info("#{label}: index_name: #{env}")
Rails.logger.info("#{label}: query: #{query}")

response = Event.delete_by_query(index: env, query: query)
# response = Event.delete_by_query(index: env, query: options[:query])

Rails.logger.info(response.to_json)
# Rails.logger.info(response.to_json)
rescue => err
Rails.logger.info("#{label}: #{err.message}")
end
Expand Down

0 comments on commit 9279e25

Please sign in to comment.