-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Фидбэк мне давай ыуыъу #1
base: master
Are you sure you want to change the base?
Conversation
List(Khinkali(Stuffing.Beef, 7), Khinkali(Stuffing.Mutton, 3)) | ||
} | ||
def apply(n_customers: Int, | ||
n_chefs: Int, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
по скаловому кодстайлу поля должны быть в камелКейзе
ctx.self ! Cook(order, replyToLater, customer) | ||
cook | ||
case Cook(order, waiter, customer) => | ||
new Exception("Received COOK message while waiting for orders") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И че? throw
наверное уж, ну и не хватает ctx.log.error
client ! Customer.Eat | ||
Behaviors.same | ||
case Start => | ||
println("Got a START message while already started. Very strange...") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
логгируем, не принтим
cheese: (Double, Double)) | ||
|
||
object Config { | ||
private val cfg = ConfigFactory.load("application") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Конфиг надо загружать в мейне
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И лучше не указывать applicaiton. Typesafe Config ориентируется на иерархию конфигов, начиная с reference.conf, который таким образом не будет подгружаться. Плюс нет возможности указать другой конфиг, если нужны настройки для разных окружений. Просто используй - ConfigFactory.load()
, а еще лучше не писать парсеры руками
|
||
object Config { | ||
private val cfg = ConfigFactory.load("application") | ||
val rng: Random = new Random(cfg.getLong("seed")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
НЕЕЕЕТ глобальным мутабельным состояниям
Если будет не лень - чекните еще раз. Вроде поправил все дырки |
C:
:*