Giter VIP home page Giter VIP logo

seniorcommander's People

Contributors

mbosecke avatar

Watchers

 avatar  avatar

seniorcommander's Issues

Incorrect timestamps on timers and chat log

I suspect they are using the wrong timezone. Make sure we are storing dates in UTC and then research how to display it dynamically in the correct timezone for the end user.

Support for custom domains

Users will set an A record on their root domain (pointing to our elastic IP) or a CNAME record on a subdomain (pointing to our domain name). They will then register their custom domain in their community settings.

Our root endpoint (/) will look up the current domain in all community settings and will internally rewrite URLs from /(.*) to /{communityName}/(?1)

Asynchronous event handlers

Currently, one event handler (ex. ConversationalHandler) can hold up all other event handlers. There should be some concurrency as well as some priority. As soon as we introduce moderation, the moderation handlers should take priority and any output events they produce (ex. /timeout) should also have priority.

Consider moving to Rabbitmq to facilitate the web application providing messages.

Moderation

As mentioned in #9, moderation message handling and outputs (ex. /timeout) should have higher priority than other event/message handling.

Turn on/off a channel on-the-fly

Probably consists of storing an "enabled" flag in the database to persist across server restarts but the actual runtime changes will be triggered via messages.

Timed auction

The ability to open an auction for a set amount of time and have it automatically close itself after that time.

Move timer "enabled" state from memory

A running timer checks the database if it is enabled or not upon each iteration. We also start a scheduled timer even if it disabled. This allows the runtime disabling/enabling of timers from the web app.

Smarter follower audit

Idea: Write a memory-efficient database query that returns a list of all known follower names (just names, not full entities). Compare this with the list of names retrieved by the Twitch API and establish a "diff". Using only the list of names in the "diff" do we query CommunityUser objects and update them accordingly (set followed date, set unfollowed date, etc).

Giveaways

!giveaway open keyword=”GIMME” eligible=follower,regular,subscriber subscriberMultiplier=2 regularMultiplier=3
!giveaway close
!giveaway winner

Timer chat line requirement not calculated properly

Now that the bot messages are logged, the integration test is failing. It is including the bot's message from the last time the timer was executed as a chat line.

Ideally, it would ignore all logs from the bot but it would need access to the channels in order to find out their usernames. Keep in mind that maybe channels will be dynamically added/removed at some point?

Ensure bot can't trigger commands with any of it's output

It should be safe no matter which channel the bot is in and keep in mind that we want to support using custom usernames for channels. Perhaps a standard method on a channel to determine the bot's username which is checked in the CommandBroker?

One failed transaction seems to stop all future logging

Failed to insert a chat log message because the community_user did not exist and then all database activity ceased.

 WARN: SQL Error: 0, SQLState: 23502
Oct 22 22:01:53 ip-172-30-4-189 java: Oct 22, 2016 10:01:53 PM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
Oct 22 22:01:53 ip-172-30-4-189 java: ERROR: ERROR: null value in column "community_user_id" violates not-null constraint
Oct 22 22:01:53 ip-172-30-4-189 java: Detail: Failing row contains (1684, 1, My dick wet, null, 2016-10-22 22:01:53.796-04).
Oct 22 22:01:53 ip-172-30-4-189 java: [ERROR] com.mitchellbosecke.seniorcommander.SeniorCommanderImpl - Error when handling message
Oct 22 22:01:53 ip-172-30-4-189 java: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:147)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:155)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:162)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:771)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:744)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:749)
Oct 22 22:01:53 ip-172-30-4-189 java: at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
Oct 22 22:01:53 ip-172-30-4-189 java: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Oct 22 22:01:53 ip-172-30-4-189 java: at java.lang.reflect.Method.invoke(Method.java:498)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.context.internal.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:355)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.sun.proxy.$Proxy17.persist(Unknown Source)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.extension.core.service.BaseService.persist(BaseService.java:33)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.extension.core.event.LoggingHandler.handle(LoggingHandler.java:37)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.SeniorCommanderImpl.lambda$run$6(SeniorCommanderImpl.java:109)
Oct 22 22:01:53 ip-172-30-4-189 java: at java.lang.Iterable.forEach(Iterable.java:75)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.SeniorCommanderImpl.run(SeniorCommanderImpl.java:107)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.SeniorCommander.main(SeniorCommander.java:24)
Oct 22 22:01:53 ip-172-30-4-189 java: Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:189)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:132)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:58)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:764)
Oct 22 22:01:53 ip-172-30-4-189 java: ... 13 more
Oct 22 22:01:53 ip-172-30-4-189 java: Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "community_user_id" violates not-null constraint
Oct 22 22:01:53 ip-172-30-4-189 java: Detail: Failing row contains (1684, 1, My dick wet, null, 2016-10-22 22:01:53.796-04).
Oct 22 22:01:53 ip-172-30-4-189 java: at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:133)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
Oct 22 22:01:53 ip-172-30-4-189 java: ... 30 more
Oct 22 22:01:53 ip-172-30-4-189 java: [ERROR] com.mitchellbosecke.seniorcommander.SeniorCommanderImpl - Error when handling message
Oct 22 22:01:53 ip-172-30-4-189 java: org.hibernate.HibernateException: find is not valid without active transaction
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.context.internal.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:351)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.sun.proxy.$Proxy17.find(Unknown Source)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.extension.core.service.BaseService.find(BaseService.java:20)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.extension.core.service.UserService.setUserOnline(UserService.java:41)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.extension.core.event.UserChatHandler.handle(UserChatHandler.java:30)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.SeniorCommanderImpl.lambda$run$6(SeniorCommanderImpl.java:109)
Oct 22 22:01:53 ip-172-30-4-189 java: at java.lang.Iterable.forEach(Iterable.java:75)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.SeniorCommanderImpl.run(SeniorCommanderImpl.java:107)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.SeniorCommander.main(SeniorCommander.java:24)
Oct 22 22:01:53 ip-172-30-4-189 java: [ERROR] com.mitchellbosecke.seniorcommander.SeniorCommanderImpl - Error when handling message
Oct 22 22:01:53 ip-172-30-4-189 java: org.hibernate.HibernateException: find is not valid without active transaction
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.context.internal.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:351)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.sun.proxy.$Proxy17.find(Unknown Source)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.extension.core.service.BaseService.find(BaseService.java:20)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.extension.core.service.BaseService.findCommunity(BaseService.java:37)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.extension.core.event.CommandBroker.handle(CommandBroker.java:49)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.SeniorCommanderImpl.lambda$run$6(SeniorCommanderImpl.java:109)
Oct 22 22:01:53 ip-172-30-4-189 java: at java.lang.Iterable.forEach(Iterable.java:75)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.SeniorCommanderImpl.run(SeniorCommanderImpl.java:107)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.SeniorCommander.main(SeniorCommander.java:24)
Oct 22 22:01:53 ip-172-30-4-189 java: [ERROR] com.mitchellbosecke.seniorcommander.SeniorCommanderImpl - Error when handling message
Oct 22 22:01:53 ip-172-30-4-189 java: org.hibernate.HibernateException: find is not valid without active transaction
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.context.internal.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:351)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.sun.proxy.$Proxy17.find(Unknown Source)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.extension.core.service.BaseService.find(BaseService.java:20)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.extension.core.service.BaseService.findCommunity(BaseService.java:37)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.extension.core.event.GiveawayKeywordHandler.handle(GiveawayKeywordHandler.java:33)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.SeniorCommanderImpl.lambda$run$6(SeniorCommanderImpl.java:109)
Oct 22 22:01:53 ip-172-30-4-189 java: at java.lang.Iterable.forEach(Iterable.java:75)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.SeniorCommanderImpl.run(SeniorCommanderImpl.java:107)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.SeniorCommander.main(SeniorCommander.java:24)
Oct 22 22:01:53 ip-172-30-4-189 java: Exception in thread "main" org.hibernate.TransactionException: Transaction was marked for rollback only; cannot commit
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:217)
Oct 22 22:01:53 ip-172-30-4-189 java: at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:68)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.SeniorCommanderImpl.run(SeniorCommanderImpl.java:115)
Oct 22 22:01:53 ip-172-30-4-189 java: at com.mitchellbosecke.seniorcommander.SeniorCommander.main(SeniorCommander.java:24)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.