configs for dev and prod

This commit is contained in:
Athou
2014-08-09 19:35:05 +02:00
parent afbbd07a13
commit c5e9e60ab0
5 changed files with 69 additions and 17 deletions

3
.gitignore vendored
View File

@@ -1,6 +1,9 @@
# build directory # build directory
target target
# log files
log
# node # node
node node
node_modules node_modules

51
config.dev.yml Normal file
View File

@@ -0,0 +1,51 @@
app:
publicUrl: http://localhost:8082/
allowRegistrations: true
googleAnalyticsTrackingCode:
googleClientId:
googleClientSecret:
backgroundThreads: 3
databaseUpdateThreads: 1
smtpHost:
smtpPort:
smtpTls: false
smtpUserName:
smtpPassword:
heavyLoad: false
pubsubhubbub: false
imageProxyEnabled: false
queryTimeout: 0
keepStatusDays: 0
refreshIntervalMinutes: 5
cache: noop
announcement:
database:
driverClass: org.h2.Driver
user: sa
password: sa
url: jdbc:h2:./target/example
properties:
charSet: UTF-8
# hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
maxWaitForConnection: 1s
validationQuery: "/* MyApplication Health Check */ SELECT 1"
minSize: 1
maxSize: 8
checkConnectionWhileIdle: true
server:
applicationConnectors:
- type: http
port: 8083
adminConnectors:
- type: http
port: 8084
logging:
level: WARN
loggers:
com.commafeed: DEBUG
liquibase: INFO
org.hibernate.SQL: ALL
appenders:
- type: console

View File

@@ -15,13 +15,11 @@ app:
pubsubhubbub: false pubsubhubbub: false
imageProxyEnabled: false imageProxyEnabled: false
queryTimeout: 0 queryTimeout: 0
crawlingPaused: false
keepStatusDays: 0 keepStatusDays: 0
refreshIntervalMinutes: 5 refreshIntervalMinutes: 5
cache: noop cache: noop
announcement: announcement:
authenticationCachePolicy: maximumSize=10000, expireAfterAccess=10m
database: database:
driverClass: org.h2.Driver driverClass: org.h2.Driver
user: sa user: sa
@@ -39,15 +37,20 @@ database:
server: server:
applicationConnectors: applicationConnectors:
- type: http - type: http
port: 8083 port: 8082
adminConnectors: adminConnectors:
- type: http - type: http
port: 8084 port: 8084
logging: logging:
level: WARN level: WARN
loggers: loggers:
com.commafeed: DEBUG com.commafeed: INFO
liquibase: INFO
org.hibernate.SQL: ALL
appenders: appenders:
- type: console - type: console
- type: file
currentLogFilename: log/commafeed.log
threshold: ALL
archive: true
archivedLogFilenamePattern: log/commafeed-%d.log
archivedFileCount: 5
timeZone: UTC

View File

@@ -87,9 +87,6 @@ public class CommaFeedConfiguration extends Configuration {
@JsonProperty @JsonProperty
private int queryTimeout; private int queryTimeout;
@JsonProperty
private boolean crawlingPaused;
@JsonProperty @JsonProperty
private int keepStatusDays; private int keepStatusDays;

View File

@@ -96,13 +96,11 @@ public class FeedQueues {
} }
// add feeds that are up to refresh from the database // add feeds that are up to refresh from the database
if (!config.getApplicationSettings().isCrawlingPaused()) { int count = batchSize - contexts.size();
int count = batchSize - contexts.size(); if (count > 0) {
if (count > 0) { List<Feed> feeds = feedDAO.findNextUpdatable(count, getLastLoginThreshold());
List<Feed> feeds = feedDAO.findNextUpdatable(count, getLastLoginThreshold()); for (Feed feed : feeds) {
for (Feed feed : feeds) { contexts.add(new FeedRefreshContext(feed, false));
contexts.add(new FeedRefreshContext(feed, false));
}
} }
} }