Sha256: a0f05b3c98432a6a5cd5c7e24f55b22231b3bd0e27136a4e1f294465bbd651c7

Contents?: true

Size: 547 Bytes

Versions: 20

Compression:

Stored size: 547 Bytes

Contents

module ClassMethods
  def reset_script_machine
    Auth.as_bot do
      card = Card[:all, :script, :machine_output]
      if card
        card.update_columns trash: true
        card.expire
        Card::Virtual.where(right_id: MachineCacheID).delete_all
      end
    end
  end

  def reset_all_machines
    Auth.as_bot do
      Card.search(right: { codename: "machine_output" }).each do |card|
        card.update_columns trash: true
        card.expire
      end
      Card::Virtual.where(right_id: MachineCacheID).delete_all
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
card-mod-machines-0.11.7 set/all/reset_machines.rb
card-mod-machines-0.12.0 set/all/reset_machines.rb
card-mod-machines-0.11.6 set/all/reset_machines.rb
card-mod-machines-0.11.5 set/all/reset_machines.rb
card-mod-machines-0.11.4 set/all/reset_machines.rb
card-mod-machines-0.11.3 set/all/reset_machines.rb
card-mod-machines-0.11.2 set/all/reset_machines.rb
card-mod-machines-0.11.1 set/all/reset_machines.rb
card-mod-machines-0.11.0 set/all/reset_machines.rb
card-1.100.0 mod/machines/set/all/reset_machines.rb
card-1.99.6 mod/machines/set/all/reset_machines.rb
card-1.99.5 mod/machines/set/all/reset_machines.rb
card-1.99.4 mod/machines/set/all/reset_machines.rb
card-1.99.1 mod/machines/set/all/reset_machines.rb
card-1.99.0 mod/machines/set/all/reset_machines.rb
card-1.98.3 mod/machines/set/all/reset_machines.rb
card-1.98.2 mod/machines/set/all/reset_machines.rb
card-1.98.1 mod/machines/set/all/reset_machines.rb
card-1.98.0 mod/machines/set/all/reset_machines.rb
card-1.97.0.1 mod/machines/set/all/reset_machines.rb