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

Trigger a profile (e.g., tag, photo, etc.) update on visit. #114

Closed
wants to merge 9 commits into from

Conversation

CERLgit
Copy link
Contributor

@CERLgit CERLgit commented Feb 28, 2024

Does as it says, If the account already exists it just runs an update as expected.
Uses add_new_player_to_pidgtm_db instead of an update function to simultaneously solve issues where accounts may not exist for some reason. While they may not be found on the search engine, visiting them directly will add them.
(Their page will not load, but it will be added to search and on refresh it will. Before, it would not load ever unless fixed manually)
Closes #111

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

Merging #114 (0171abd) into main (0052958) will decrease coverage by 0.07%.
Report is 1 commits behind head on main.
The diff coverage is 0.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #114      +/-   ##
==========================================
- Coverage   14.85%   14.79%   -0.07%     
==========================================
  Files          24       24              
  Lines        1494     1501       +7     
==========================================
  Hits          222      222              
- Misses       1272     1279       +7     

Copy link
Owner

@danbugs danbugs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

.get_results::<Player>(&mut db_connection)
.await?;

let query = diesel::sql_query("SELECT * FROM players WHERE gamer_tag ILIKE $1 ORDER BY LENGTH(gamer_tag) ASC, player_id ASC")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk why GitHub is showing this as a change considering you only changed this in your old PR and main looks like:

let query = diesel::sql_query("SELECT * FROM players WHERE gamer_tag ILIKE $1 ORDER BY LENGTH(gamer_tag) ASC, player_id ASC")
🤔

make_pidgtm_player_getter_query(id, Arc::new(Mutex::new(PIDGTM_PlayerGetterVars::empty())))
.await
{
add_new_player_to_pidgtm_db(&player_data.player.unwrap()).await?;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose the name of this function is a bit confusing at this point 😅

@CERLgit CERLgit closed this Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Visiting a profile should also trigger a profile (e.g., tag, photo, etc.) update
2 participants