Commit 810e743d23f44ed0304cab28e17bda3f19090b20

Authored by hausdoerfer
1 parent 9cbe1f84

add new deployment script

scripts/deployment.sh
1 1 #!/usr/bin/env bash
  2 +cp -f ../config/beuthbot.properties docker/wildfly/volumes/conf/beuthbot.properties
2 3 ./gradlew war
3   -cd src/main/docker
4   -docker-compose down && docker-compose up --build -d
5 4 \ No newline at end of file
  5 +cd docker/
  6 +docker-compose down && docker-compose up --build
6 7 \ No newline at end of file
... ...
services/Telegram/src/main/java/de/bht/beuthbot/messenger/telegram/TelegramReceiveAdapter.java
... ... @@ -157,53 +157,6 @@ public class TelegramReceiveAdapter {
157 157 }
158 158  
159 159 /**
160   - * Test method for database
161   - * @return Http response
162   - */
163   - @GET
164   - @Path("/testDatabase")
165   - public Response testDatabase() {
166   - logger.info("testDatabase: Start");
167   - AppUser user = userDAO.createUser();
168   - user.setFacebookUserId("88");
169   - user.setTelegramUserId("99");
170   - user.setProperty("test_key", "test_value");
171   - userDAO.saveOrUpdate(user);
172   - logger.info("testDatabase: Speichern durchgefuehrt");
173   -
174   - List<AppUser> userList = userDAO.findAll();
175   - String result = userList.get(0).getTelegramUserId();
176   - logger.info("TelegramUserId: " + result);
177   - logger.info("testDatabase: Auslesen durchgefuehrt");
178   -
179   - Reminder reminder = reminderDAO.createReminder();
180   - reminder.setMessenger(Messenger.TELEGRAM);
181   - reminder.setReminderCycle(ReminderCycle.DAILY);
182   - reminder.setCycleDate(LocalDateTime.now());
183   - Long userId = userList.get(0).getId();
184   - reminder.setUserId(userId);
185   - reminder.setIntent("Intent");
186   - HashMap entities = new HashMap();
187   - entities.put("key1", "value2");
188   - entities.put("key2", "value2");
189   - reminder.setEntities(entities);
190   - reminderDAO.saveOrUpdate(reminder);
191   -
192   - List<Reminder> reminders = reminderDAO.findAll();
193   - Reminder reminderResult = reminders.get(0);
194   - logger.info("Reminder Cycle: " + reminderResult.getReminderCycle().toString());
195   - logger.info("Telegram ID via Reminder: " + userDAO.findById(reminderResult.getUserId()).getTelegramUserId());
196   -
197   - LogMessage logMessage = logMessageDAO.createMessage();
198   - logMessage.setUserId(userList.get(0).getId());
199   - logMessage.setMessage("Message");
200   - logMessageDAO.saveOrUpdate(logMessage);
201   -
202   - return Response.status(HttpStatus.SC_OK).build();
203   - }
204   -
205   -
206   - /**
207 160 * RESTEasy HTTP Post to set Webhook
208 161 */
209 162 @POST
... ...