def handle_info({:replication_log, logEntry}, worker) do | |
newWorkerState = | |
if logEntry.origin == worker.name do | |
worker | |
else | |
%{ worker | | |
clock: max(worker.clock, logEntry.time) + 1, | |
eventLog: [logEntry | worker.eventLog] } | |
end | |
{:noreply, newWorkerState } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment