Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

einepeople
Copy link

C:
:*

@einepeople einepeople changed the title Фидбэк мне давай блятб Фидбэк мне давай ыуыъу Mar 11, 2020
List(Khinkali(Stuffing.Beef, 7), Khinkali(Stuffing.Mutton, 3))
}
def apply(n_customers: Int,
n_chefs: Int,
Copy link
Owner

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")
Copy link
Owner

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...")
Copy link
Owner

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")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Конфиг надо загружать в мейне

Copy link
Contributor

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"))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

НЕЕЕЕТ глобальным мутабельным состояниям

@einepeople
Copy link
Author

Если будет не лень - чекните еще раз. Вроде поправил все дырки

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants