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

Adding the possibility to not pull changes for repositories for a given period and fix readme #76

Merged
merged 4 commits into from
Jun 1, 2016

Conversation

twasyl
Copy link
Contributor

@twasyl twasyl commented May 27, 2016

In order to save network bandwith as well as uneeded logs, the configuration of Codebrag gets enriched with a new parameter store in the codebrag block. This parameter is of the following form:

pull-sleep-period {
    enabled = true
    from = 22
    to = 5
}

This configuration says that Codebrag is allowed to not pull changes for repositories from 10PM to 4:59AM. If enabled is set to false then Codebrag will always pull changes.

This PR also fixes an error in the README.md : in order to run the H2 console from sbt we must call codebrag-dao/runH2Console and not codebrag-dao/run-h2-console.

…en period (especially during the night) as well as fixing README for running the H2 console from sbt.
@@ -17,6 +17,9 @@ trait CodebragConfig extends ConfigWithDefault with StatsConfig with EmailNotifi

lazy val invitationExpiryTime: ReadablePeriod = Period.millis(getMilliseconds("codebrag.invitation-expiry-time", 24.hours.toMillis).toInt)

lazy val pullSleepPeriodEnabled = getBoolean("codebrag.pull-sleep-period.enabled", default = true)
Copy link
Member

Choose a reason for hiding this comment

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

What about using false by default? Thus will keep backward comaptibility

}

trait EmailNotificationConfig extends ConfigWithDefault {
lazy val userNotifications: Boolean = getBoolean("email-notifications.enabled", default = true)
lazy val userNotifications: Boolean = getBoolean("email-notifications.enabled", default = false)
Copy link
Member

Choose a reason for hiding this comment

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

Why did you switch this to false?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, this is a mistake. Il altered the wrong line. I will push it back with true.

@lukaszlenart
Copy link
Member

No more comments from my side, great work! 👍

@lukaszlenart lukaszlenart merged commit 689fbff into softwaremill:master Jun 1, 2016
@twasyl
Copy link
Contributor Author

twasyl commented Jun 1, 2016

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants