Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more in app notifications #562

Closed
3 of 4 tasks
lil5 opened this issue Jul 27, 2023 · 14 comments
Closed
3 of 4 tasks

Add more in app notifications #562

lil5 opened this issue Jul 27, 2023 · 14 comments

Comments

@lil5
Copy link
Member

lil5 commented Jul 27, 2023

@lil5
Copy link
Member Author

lil5 commented Jul 27, 2023

@tobifaf If you interested?

Start off with finishing off A new bulky item is added, create a PR for that, then we call look at the others in this list

@ghost
Copy link

ghost commented Jul 27, 2023

sure thing!

@lil5 lil5 assigned ghost Jul 27, 2023
@lil5
Copy link
Member Author

lil5 commented Jul 27, 2023

Awesome! for code references/example find the flow for Somebody holds a bag for longer than 7 days

@ghost
Copy link

ghost commented Jul 30, 2023

@lil5
Copy link
Member Author

lil5 commented Jul 31, 2023

@ghost
Copy link

ghost commented Aug 7, 2023

as discussed and tested, the "A new bulky item is added priority" is already working

@lil5
Copy link
Member Author

lil5 commented Aug 29, 2023

Somebody else set you to a bag is fixed here: #584

@ghost
Copy link

ghost commented Aug 30, 2023

@lil5 can you have a look at this proposal for making sure users are not getting alot of the same notifications? bef9e99

@lil5
Copy link
Member Author

lil5 commented Aug 31, 2023

@tobifaf good idea, there are no in memory hashmap packages (think redis but living in the go runtime), we could use for a more global approach?

maybe something like this may help? https://github.com/orcaman/concurrent-map

@ghost
Copy link

ghost commented Sep 1, 2023

@lil5, concurrent-map seems a nice and simple solution. Do you prefer to have this as sort of a more generic "key/value in-application" db?

@lil5
Copy link
Member Author

lil5 commented Sep 1, 2023

@tobifaf Before coding could you please create a mermaid document explaining what/how you want it to work.

@ghost
Copy link

ghost commented Sep 1, 2023

sure thing!

@ghost
Copy link

ghost commented Dec 7, 2023

@lil5 can you have a look at #658 ? This is my proposal for the debounced notification system.

@ghost
Copy link

ghost commented Dec 18, 2023

@lil5 i was looking at SetRouteOrderByUserUIDs in models/chain.go, since that's triggered on every route change. The proposed SQL is something like:

users := []User{}
tx.Exec(SELECT users.* FROM user_chains LEFT JOIN users ON users.id = user_chains.user_id WHERE user_chains.chain_id = ? AND user_chains.route_order BETWEEN ? AND ?, c.ID, i-2, i+2).Scan(&users)

But this does not take into account:

  • changes at the start of the loop should also include the last one or two users at the end of the loop.
  • the same but for changes at the end of the loop
  • sometimes the route_order is missing entries (for example: 1,2,4,5,6 is missing the 3). In this case not every user that should be notified is triggered.

If a user is removed from the loop, this is also not triggered. So that needs a different implementation.

@lil5 lil5 closed this as completed Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

1 participant