Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ buildNumber.properties
!/.mvn/wrapper/maven-wrapper.jar

.idea
*.iml
todo.txt
tw.txt
twitterwall.log
Expand Down
2 changes: 1 addition & 1 deletion .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-Xmx1024m
-Xmx350m -Xss512k -Dfile.encoding=UTF-8
27 changes: 23 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
sudo: false
language: java
jdk:
- oraclejdk8
script:
- test/run-travis.sh
- oraclejdk8
addons:
apt:
packages:
- oracle-java8-installer
services:
- postgresql
before_install:
- sudo apt-get update
- sudo apt-get install language-pack-de
- sudo /etc/init.d/postgresql stop
- sudo /etc/init.d/postgresql start 9.6
before_script:
- psql -c "CREATE USER twitterwall2test WITH PASSWORD 'twitterwall2testpwd' LOGIN SUPERUSER INHERIT CREATEDB CREATEROLE NOREPLICATION;" -U postgres
- psql -c 'GRANT pg_signal_backend, postgres TO twitterwall2test WITH ADMIN OPTION;' -U postgres
- psql -c "CREATE DATABASE twitterwall2test WITH OWNER = twitterwall2test TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'de_DE.UTF-8' LC_CTYPE = 'de_DE.UTF-8' CONNECTION LIMIT = -1;" -U postgres
- psql -c '\l' -U postgres
- psql -c '\dg' -U postgres
- psql -c '\dn' -U postgres
- psql -c 'select * from version();' -U postgres
- psql -c 'select * from version();' -U twitterwall2test
sudo: false
script: ./mvnw clean site site:deploy -Ptravis -Dtest=AlphaTopLevelSuiteIT -B -V
2 changes: 1 addition & 1 deletion test/db-count.sql → etc/db-count.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ select count(*) from hashtag;
select count(*) from tweet;
select count(*) from userlist_members;
select count(*) from userlist_subcriber;
select count(*) from userprofile;
select count(*) from userlist;
select count(*) from userprofile;
select count(*) from task_history;
select count(*) from task;
2 changes: 1 addition & 1 deletion test/db-drop-tables.sql → etc/db-drop-tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ drop table mention;
drop table media;
drop table hashtag;
drop table tweet;
drop table userprofile;
drop table userlist_members;
drop table userlist_subcriber;
drop table userlist;
drop table userprofile;
drop table task_history;
drop table task;
drop sequence hibernate_sequence;
2 changes: 1 addition & 1 deletion test/db-reset.sql → etc/db-reset.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ delete from mention;
delete from media;
delete from hashtag;
delete from tweet;
delete from userprofile;
delete from userlist_members;
delete from userlist_subcriber;
delete from userlist;
delete from userprofile;
delete from task_history;
delete from task;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 36 additions & 0 deletions heroku.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/opt/local/bin/bash

export PORT=8080
export JAVA_OPTS='-Xmx350m -Xss512k'

export DATABASE_URL='jdbc:postgresql://localhost:5432/twitterwall2?user=twitterwall2&password=twitterwall2pwd'
export DATABASE_URL_TEST='jdbc:postgresql://localhost:5432/twitterwall2test?user=twitterwall2test&password=twitterwall2testpwd'
export TWITTERWALL_FRONTEND_MAX_RESULTS=200
export TWITTERWALL_SHOW_USERS_MENU=true
export TWITTERWALL_CONTEXT_TEST=true
export TWITTER_PAGE_SIZE=500
export TWITTER_FETCH_TESTDATA=false
export TWITTERWALL_WAIT_FOR_TEST=120000
export TWITTERWALL_URL_TEST_DATA_VERBOSE=false
export TWITTERWALL_SCHEDULER_ALLOW_UPDATE_TWEETS=false
export TWITTERWALL_SCHEDULER_ALLOW_UPDATE_USERS=false
export TWITTERWALL_SCHEDULER_ALLOW_UPDATE_USERS_FROM_MENTION=false
export TWITTERWALL_SCHEDULER_ALLOW_REMOVE_OLD_DATA_FROM_STORAGE=false
export TWITTERWALL_SCHEDULER_ALLOW_SEARCH=false
export TWITTER_SEARCH_TERM='#hibernate OR #java OR #TYPO3'
export TWITTERWALL_INFO_WEBPAGE=https://github.com/phasenraum2010/twitterwall2
export TWITTERWALL_THEME=typo3
export TWITTERWALL_APP_NAME=Twitterwall
export TWITTERWALL_INFO_IMPRINT_SCREEN_NAME=port80guru
export TWITTERWALL_GOOGLE_ANALYTICS_ID=TWITTERWALL_GOOGLE_ANALYTICS_ID
export TWITTERWALL_SCHEDULER_HEROKU_DB_LIMIT=false
export TWITTERWALL_SCHEDULER_USER_LIST_NAME=test-typo3-hibernate-java
export TWITTERWALL_SCHEDULER_USER_LIST_ALLOW=false
export TWITTERWALL_JPA_HIBERNATE_DDL_AUTO=update
#export TWITTERWALL_JPA_HIBERNATE_DDL_AUTO=create-drop
export TWITTERWALL_LOGIN_USERNAME=tw
export TWITTERWALL_LOGIN_PASSWORD=vbfvjdgar64r67tf7a46tf76rgtfgf7d6g

./mvnw clean install

java -Dserver.port=$PORT $JAVA_OPTS -jar target/twitterwall2-1.0.28-SNAPSHOT.jar
52 changes: 0 additions & 52 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -430,14 +430,6 @@
<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand All @@ -450,55 +442,11 @@
</build>
</profile>

<profile>
<id>testing</id>
<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<spring.profiles.active>testing</spring.profiles.active>
<failsafe.skipAfterFailureCount>1</failsafe.skipAfterFailureCount>
<surefire.skipAfterFailureCount>1</surefire.skipAfterFailureCount>
</systemPropertyVariables>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<spring.profiles.active>testing</spring.profiles.active>
<failsafe.skipAfterFailureCount>1</failsafe.skipAfterFailureCount>
<surefire.skipAfterFailureCount>1</surefire.skipAfterFailureCount>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>travis</id>
<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<spring.profiles.active>travis</spring.profiles.active>
<failsafe.skipAfterFailureCount>1</failsafe.skipAfterFailureCount>
<surefire.skipAfterFailureCount>1</surefire.skipAfterFailureCount>
</systemPropertyVariables>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
31 changes: 31 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/opt/local/bin/bash

export DATABASE_URL='jdbc:postgresql://localhost:5432/twitterwall2?user=twitterwall2&password=twitterwall2pwd'
export DATABASE_URL_TEST='jdbc:postgresql://localhost:5432/twitterwall2test?user=twitterwall2test&password=twitterwall2testpwd'
export TWITTERWALL_FRONTEND_MAX_RESULTS=200
export TWITTERWALL_SHOW_USERS_MENU=true
export TWITTERWALL_CONTEXT_TEST=true
export TWITTER_PAGE_SIZE=500
export TWITTER_FETCH_TESTDATA=false
export TWITTERWALL_WAIT_FOR_TEST=120000
export TWITTERWALL_URL_TEST_DATA_VERBOSE=false
export TWITTERWALL_SCHEDULER_ALLOW_UPDATE_TWEETS=false
export TWITTERWALL_SCHEDULER_ALLOW_UPDATE_USERS=false
export TWITTERWALL_SCHEDULER_ALLOW_UPDATE_USERS_FROM_MENTION=false
export TWITTERWALL_SCHEDULER_ALLOW_REMOVE_OLD_DATA_FROM_STORAGE=false
export TWITTERWALL_SCHEDULER_ALLOW_SEARCH=false
export TWITTER_SEARCH_TERM='#hibernate OR #java OR #TYPO3'
export TWITTERWALL_INFO_WEBPAGE=https://github.com/phasenraum2010/twitterwall2
export TWITTERWALL_THEME=typo3
export TWITTERWALL_APP_NAME=Twitterwall
export TWITTERWALL_INFO_IMPRINT_SCREEN_NAME=port80guru
export TWITTERWALL_GOOGLE_ANALYTICS_ID=TWITTERWALL_GOOGLE_ANALYTICS_ID
export TWITTERWALL_SCHEDULER_HEROKU_DB_LIMIT=false
export TWITTERWALL_SCHEDULER_USER_LIST_NAME=test-typo3-hibernate-java
export TWITTERWALL_SCHEDULER_USER_LIST_ALLOW=false
export TWITTERWALL_JPA_HIBERNATE_DDL_AUTO=update
#export TWITTERWALL_JPA_HIBERNATE_DDL_AUTO=create-drop
export TWITTERWALL_LOGIN_USERNAME=tw
export TWITTERWALL_LOGIN_PASSWORD=vbfvjdgar64r67tf7a46tf76rgtfgf7d6g

./mvnw clean spring-boot:run
36 changes: 18 additions & 18 deletions src/main/java/org/woehlke/twitterwall/CronJobs.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void createImprintUserAsync(){
String msg = "create Imprint User (Async) ";
if(!schedulerProperties.getSkipFortesting()) {
Task task = mqTaskStartFireAndForget.createImprintUserAsync();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand All @@ -30,7 +30,7 @@ public void fetchTweetsFromTwitterSearch() {
String msg = "fetch Tweets From TwitterSearch ";
if((schedulerProperties.getAllowFetchTweetsFromTwitterSearch()) && (!schedulerProperties.getSkipFortesting())) {
Task task = mqTaskStartFireAndForget.fetchTweetsFromSearch();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand All @@ -39,7 +39,7 @@ public void fetchUsersFromDefinedUserList(){
String msg = "fetch Users from Defined User List ";
if((schedulerProperties.getFetchUsersFromDefinedUserListAllow()) && (!schedulerProperties.getSkipFortesting())) {
Task task = mqTaskStartFireAndForget.fetchUsersFromList();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand All @@ -48,7 +48,7 @@ public void getHomeTimeline() {
String msg = "get Home Timeline Tweets ";
if((schedulerProperties.getAllowGetHomeTimeline()) && (!schedulerProperties.getSkipFortesting())) {
Task task = mqTaskStartFireAndForget.getHomeTimeline();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand All @@ -57,7 +57,7 @@ public void getUserTimeline() {
String msg = " get User Timeline Tweets ";
if((schedulerProperties.getAllowGetUserTimeline()) && (!schedulerProperties.getSkipFortesting())) {
Task task = mqTaskStartFireAndForget.getUserTimeline();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand All @@ -66,7 +66,7 @@ public void getMentions() {
String msg = " get Mentions ";
if((schedulerProperties.getAllowGetMentions()) && (!schedulerProperties.getSkipFortesting())) {
Task task = mqTaskStartFireAndForget.getMentions();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand All @@ -75,7 +75,7 @@ public void getFavorites() {
String msg = " get Favorites ";
if((schedulerProperties.getAllowGetFavorites()) && (!schedulerProperties.getSkipFortesting())) {
Task task = mqTaskStartFireAndForget.getFavorites();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand All @@ -84,7 +84,7 @@ public void getRetweetsOfMe() {
String msg = " get Retweets Of Me ";
if((schedulerProperties.getAllowGetRetweetsOfMe()) && (!schedulerProperties.getSkipFortesting())) {
Task task = mqTaskStartFireAndForget.getRetweetsOfMe();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand All @@ -93,9 +93,9 @@ public void getLists() {
String msg = " get Lists ";
if((schedulerProperties.getAllowGetLists()) && (!schedulerProperties.getSkipFortesting())) {
Task task = mqTaskStartFireAndForget.getLists();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
task = mqTaskStartFireAndForget.fetchUserlistOwners();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand All @@ -104,7 +104,7 @@ public void fetchFollower(){
String msg = "fetch Follower ";
if((schedulerProperties.getFetchFollowerAllow()) && (!schedulerProperties.getSkipFortesting())) {
Task task = mqTaskStartFireAndForget.fetchFollower();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand All @@ -113,7 +113,7 @@ public void fetchFriends(){
String msg = "fetch Friends ";
if((schedulerProperties.getFetchFriendsAllow()) && (!schedulerProperties.getSkipFortesting())) {
Task task = mqTaskStartFireAndForget.fetchFriends();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand All @@ -122,7 +122,7 @@ public void removeOldDataFromStorage(){
String msg = "remove Old Data From Storage: ";
if((schedulerProperties.getRemoveOldDataFromStorageAllow()) && (!schedulerProperties.getSkipFortesting())) {
Task task = mqTaskStartFireAndForget.removeOldDataFromStorage();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand All @@ -131,7 +131,7 @@ public void updateUserProfilesFromMentions(){
String msg = "update User Profiles From Mentions";
if((schedulerProperties.getAllowUpdateUserProfilesFromMention()) && (!schedulerProperties.getSkipFortesting())) {
Task task = mqTaskStartFireAndForget.updateUsersFromMentions();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand All @@ -140,7 +140,7 @@ public void updateTweets() {
String msg = "update Tweets ";
if((schedulerProperties.getAllowUpdateTweets()) && (!schedulerProperties.getSkipFortesting())){
Task task = mqTaskStartFireAndForget.updateTweets();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand All @@ -149,7 +149,7 @@ public void updateUserProfiles() {
String msg = "update User Profiles ";
if((schedulerProperties.getAllowUpdateUserProfiles()) && (!schedulerProperties.getSkipFortesting())) {
Task task = mqTaskStartFireAndForget.updateUsers();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand All @@ -158,7 +158,7 @@ public void startUpdateUrls(){
String msg = "start UpdateUrls ";
if(!schedulerProperties.getSkipFortesting()) {
Task task = mqTaskStartFireAndForget.startUpdateUrls();
log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand All @@ -168,7 +168,7 @@ public void startGarbageCollection(){
if(!schedulerProperties.getSkipFortesting()) {
//TODO:
//Task task = mqTaskStartFireAndForget.startGarbageCollection();
//log.info(msg+ "SCHEDULED: task "+task.getUniqueId());
//log.debug(msg+ "SCHEDULED: task "+task.getUniqueId());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void finishAsnyc(Message<List<MentionMessage>> incomingMessageList) {
Task task = taskService.findById(taskId);
String msgDone = "Sucessfully finished task "+task.getTaskType()+" via MQ by FIRE_AND_FORGET_SENDER";
taskService.done(msgDone,task,countedEntities);
log.info(msgDone);
log.debug(msgDone);
}

private final TaskService taskService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.woehlke.twitterwall.backend.mq.mentions.endpoint.serviceactivator.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;
import org.woehlke.twitterwall.oodm.model.Mention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.woehlke.twitterwall.backend.mq.mentions.endpoint.serviceactivator.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;
import org.woehlke.twitterwall.oodm.model.Task;
Expand Down
Loading