Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
renatomassaro committed Feb 16, 2018
1 parent ce072c4 commit f3be608
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/software/event/handler/virus.ex
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
defmodule Helix.Software.Event.Handler.Virus do

alias Helix.Event

alias Helix.Software.Action.Virus, as: VirusAction

alias Helix.Software.Event.File.Install.Processed,
as: FileInstallProcessedEvent
alias Helix.Software.Event.Virus.Collect.Processed,
as: VirusCollectProcessedEvent

@doc """
Handles the completion of FileInstallProcess when the target file is a virus.
Expand All @@ -29,4 +30,8 @@ defmodule Helix.Software.Event.Handler.Virus do
end
def virus_installed(%FileInstallProcessedEvent{backend: _}),
do: :noop

def handle_collect(%VirusCollectProcessedEvent{}) do
IO.puts "collected"
end
end
5 changes: 5 additions & 0 deletions lib/software/model/virus.ex
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ defmodule Helix.Software.Model.Virus do
active: nil}
end

def calculate_earnings(_file = %File{}, _virus = %Virus{}, _saved_earnings) do
# Obviously TODO
5000
end

query do

alias Helix.Entity.Model.Entity
Expand Down

0 comments on commit f3be608

Please sign in to comment.