GithubHelp home page GithubHelp logo

Comments (2)

bfosberry avatar bfosberry commented on June 7, 2024

Ideally we could tie in an async worker for this. We will need one to poll for changes in a users location, however for now, since we are performing manual updates, it would be ok to trigger off of a location update (after_save on game_location model maybe)

We will need to pop a new alert when a users location changes and it matches an alert criteria for another users. We'll probably need to do some dynamic searching on the alert schedule model for this. Also we'll need a new alert model which keeps track of previous instances and ensures that we dont create duplicates.

  1. Create an alert model (naming open for specificity) to keep track of alerts that are popped.
  2. Alert model should have title, body, active(y/n), status ("new", "sending", "delivered") plus an alert_schedule_id field for the rails join.
  3. we need a process (either triggered from the game location controller or model, or a rake task) to process changes in game location, and match them up to alert schedules. Any alert schedule that matches should trigger an event, unless an active alert exists for that alert schedule.

An alert should be considered active based on whether the game_location is different than what it was when the alert was triggered. We can achieve this with two steps

First we can tie directly into the game_location model id. Changes are applied via creates, not updates.

Secondly we can have game_location create do a find_or_create_by_ALL_FIELDS to ensure that we dont create duplicates.

from gamesocial.

bfosberry avatar bfosberry commented on June 7, 2024

Partially done, split out into other issues

from gamesocial.

Related Issues (20)

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.