Commit 4d3fd3b2 by Jan Hrabal

server rt

parent 29e0b2df
#!/bin/sh
docker stop radegast
docker rm radegast
#
#npm run build:production --prefix src/main/frontend
#
mvn clean install docker:build -DskipTests=true
#mvn docker:build -DskipTests=true
#
if [ "$1" == "push" ]
then
docker push jhdockerhub/radegast:latest
fi
#
#docker run -p127.0.0.1:7070:7070 --restart=unless-stopped -e HOSTNAME_BASE=http://localhost:3030 --link postgresdb:postgresdb --link mailserver:mailserver -v /cygdrive/c/data/suite:/var/data -v /cygdrive/c/data/fonts:/var/fonts -d --name suite jhdockerhub/suite:latest
#
#docker run -p127.0.0.1:7070:7070 --log-opt max-size=50m -e HOSTNAME_BASE=http://localhost:3030 --restart=unless-stopped --link postgresdb:postgresdb -v C:/data/suite:/var/data -v C:/data/fonts:/var/fonts -d --name suite jhdockerhub/suite:latest --spring.mail.host=docker.for.win.localhost --spring.profiles.active=dev
#
docker images --quiet --filter=dangling=true | xargs --no-run-if-empty docker rmi -f
\ No newline at end of file
/*
CREATE DATABASE rateit
CREATE DATABASE radegast
WITH
OWNER = postgres
ENCODING = 'utf8'
......
......@@ -6,8 +6,8 @@ build.timestamp=@timestamp@
app.locales=en,cs,de
# logging
logging.level.org.hibernate=WARN
logging.level.org.hibernate.SQL=WARN
logging.level.org.hibernate=ERROR
logging.level.org.hibernate.SQL=ERROR
# server port config
......
Manifest-Version: 1.0
Built-By: Jan
Build-Jdk: 10.0.2
Implementation-Title: RateIT
Implementation-Version: 0.0.1
Implementation-Vendor-Id: com.jh
Implementation-URL: https://projects.spring.io/spring-boot/#/spring-bo
ot-starter-parent/boot-react/radegast
Created-By: Maven Integration for Eclipse
......@@ -2,7 +2,7 @@ import React from 'react';
import { StyleSheet, Text, View, TouchableOpacity, AsyncStorage, Alert, StatusBar } from 'react-native';
const SEND_DATA_TIMER = 10000;
const SEND_DATA_TIMER = 60000;
const INFO_TIMER = 1000;
......@@ -24,12 +24,12 @@ class App extends React.PureComponent {
}
componentDidMount() {
this.timer = setTimeout(this.sendData, SEND_DATA_TIMER);
this.timer = setInterval(this.sendData, SEND_DATA_TIMER);
}
componentWillUnmount() {
if (this.timer) {
clearTimeout(this.timer);
clearInterval(this.timer);
}
}
......@@ -52,22 +52,24 @@ class App extends React.PureComponent {
let response = await fetch('https://radegast.janhrabal.com/api/ratings', {
method: "POST",
body: JSON.stringify(body)
body: JSON.stringify(body),
headers: {
'Content-Type': 'application/json',
}
});
let responseJson = await response.json();
return responseJson.movies;
//let responseJson = await response.text();
//return responseJson.movies;
} catch (error) {
//console.error(error);
// return to buffer
while (body.length) {
buffer.push(body.shift());
}
}
//set other timeout
this.timer = setTimeout(this.sendData, SEND_DATA_TIMER);
console.warn("sendData - error", this.state.buffer);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment