# Base class for workers that operate on Snapshots
class SnapshotWorker
  include Sidekiq::Worker

  protected

  # @return [Boolean]
  def set_snapshot(snapshot_id)
    begin
      @snapshot = Snapshot.find(snapshot_id)
      true
    rescue ActiveRecord::RecordNotFound
      # The Snapshot was deleted before the worker could run, so there is
      # nothing left for this worker to do.
      false
    end
  end
end

# Base class for workers that operate on Snapshots
class SnapshotWorker
  include Sidekiq::Worker

  protected

  # @return [Boolean]
  def set_snapshot(snapshot_id)
    @snapshot = Snapshot.find(snapshot_id)
    true
  rescue ActiveRecord::RecordNotFound
    # The Snapshot was deleted before the worker could run, so there is
    # nothing left for this worker to do.
    false
  end
end

Remove redundant `begin` block in SnapshotWorker
Remove redundant `begin` block in SnapshotWorker

As pointed out by rubocop, this `begin` block is redundant. Removing it
to simplify.

Change-Id: I4ad6e81daa844ad33ac57bcbae993b51848dc447
