• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / bibdata / b3c4a532-5da0-46f8-9c20-20018605a028

21 Mar 2025 08:11PM UTC coverage: 42.257% (-49.9%) from 92.185%
b3c4a532-5da0-46f8-9c20-20018605a028

push

circleci

sandbergja
Move various gems from the default Gemfile group to a more appropriate group

1599 of 3784 relevant lines covered (42.26%)

2.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

42.86
/app/jobs/delete_events_job.rb
1
class DeleteEventsJob
1✔
2
  include Sidekiq::Worker
1✔
3
  # @param dump_type [Symbol] the dump type of the dumps you want to clean up
4
  # @param older_than [int] the Time before which dumps should be deleted
5
  def perform(dump_type, older_than)
1✔
6
    older_than = Time.zone.parse(older_than)
×
7
    event_ids = Event.joins(:dump)
×
8
                     .where('dump.dump_type': dump_type.to_sym)
9
                     .where(start: ..older_than)
10
                     .map(&:id)
11
    Event.destroy(event_ids)
×
12
  rescue ActiveRecord::InvalidForeignKey => e
13
    Rails.logger.warn("Likely tried to delete a dump that is either the 'dump_in_progress' or 'last_dump_completed' for an index manager.\n Error message: #{e.message}")
×
14
  end
15
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc