From c5e9e60ab082528252544535f4543f1d1ee1e41f Mon Sep 17 00:00:00 2001 From: Athou Date: Sat, 9 Aug 2014 19:35:05 +0200 Subject: [PATCH] configs for dev and prod --- .gitignore | 3 ++ config.dev.yml | 51 +++++++++++++++++++ config.yml | 17 ++++--- .../com/commafeed/CommaFeedConfiguration.java | 3 -- .../commafeed/backend/feed/FeedQueues.java | 12 ++--- 5 files changed, 69 insertions(+), 17 deletions(-) create mode 100644 config.dev.yml diff --git a/.gitignore b/.gitignore index 755a3061..ffe55c89 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ # build directory target +# log files +log + # node node node_modules diff --git a/config.dev.yml b/config.dev.yml new file mode 100644 index 00000000..c902a71e --- /dev/null +++ b/config.dev.yml @@ -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 \ No newline at end of file diff --git a/config.yml b/config.yml index 6941c882..6d4219a6 100644 --- a/config.yml +++ b/config.yml @@ -15,13 +15,11 @@ app: pubsubhubbub: false imageProxyEnabled: false queryTimeout: 0 - crawlingPaused: false keepStatusDays: 0 refreshIntervalMinutes: 5 cache: noop announcement: -authenticationCachePolicy: maximumSize=10000, expireAfterAccess=10m database: driverClass: org.h2.Driver user: sa @@ -39,15 +37,20 @@ database: server: applicationConnectors: - type: http - port: 8083 + port: 8082 adminConnectors: - type: http port: 8084 logging: level: WARN loggers: - com.commafeed: DEBUG - liquibase: INFO - org.hibernate.SQL: ALL + com.commafeed: INFO appenders: - - type: console \ No newline at end of file + - type: console + - type: file + currentLogFilename: log/commafeed.log + threshold: ALL + archive: true + archivedLogFilenamePattern: log/commafeed-%d.log + archivedFileCount: 5 + timeZone: UTC \ No newline at end of file diff --git a/src/main/java/com/commafeed/CommaFeedConfiguration.java b/src/main/java/com/commafeed/CommaFeedConfiguration.java index 4b9abc6f..5785eaf7 100644 --- a/src/main/java/com/commafeed/CommaFeedConfiguration.java +++ b/src/main/java/com/commafeed/CommaFeedConfiguration.java @@ -87,9 +87,6 @@ public class CommaFeedConfiguration extends Configuration { @JsonProperty private int queryTimeout; - @JsonProperty - private boolean crawlingPaused; - @JsonProperty private int keepStatusDays; diff --git a/src/main/java/com/commafeed/backend/feed/FeedQueues.java b/src/main/java/com/commafeed/backend/feed/FeedQueues.java index 2cb72f7f..bfb61603 100644 --- a/src/main/java/com/commafeed/backend/feed/FeedQueues.java +++ b/src/main/java/com/commafeed/backend/feed/FeedQueues.java @@ -96,13 +96,11 @@ public class FeedQueues { } // add feeds that are up to refresh from the database - if (!config.getApplicationSettings().isCrawlingPaused()) { - int count = batchSize - contexts.size(); - if (count > 0) { - List feeds = feedDAO.findNextUpdatable(count, getLastLoginThreshold()); - for (Feed feed : feeds) { - contexts.add(new FeedRefreshContext(feed, false)); - } + int count = batchSize - contexts.size(); + if (count > 0) { + List feeds = feedDAO.findNextUpdatable(count, getLastLoginThreshold()); + for (Feed feed : feeds) { + contexts.add(new FeedRefreshContext(feed, false)); } }