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

"Manually" (with SQL) fill the default timelines #696

Closed
wants to merge 2 commits into from
Closed

Conversation

elegaanz
Copy link
Member

Fixes #692

Adding a plm command was too much refactoring (because the timelines need a PlumeRocket while plm only has a Connection), so I didn't do it.

@elegaanz elegaanz added C: Bug Something isn't working S: Ready for review This PR is ready to be reviewed A: Backend Code running on the server labels Nov 15, 2019
@codecov
Copy link

codecov bot commented Nov 15, 2019

Codecov Report

Merging #696 into master will increase coverage by 0.07%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #696      +/-   ##
==========================================
+ Coverage   39.25%   39.32%   +0.07%     
==========================================
  Files          72       72              
  Lines        9498     9498              
  Branches     2265     2265              
==========================================
+ Hits         3728     3735       +7     
+ Misses       4713     4706       -7     
  Partials     1057     1057

Copy link
Contributor

@igalic igalic left a comment

Choose a reason for hiding this comment

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

can you please explain the difference between the two queries, and why they are (both) necessary

@elegaanz elegaanz requested a review from igalic November 16, 2019 17:58
Copy link
Contributor

@igalic igalic left a comment

Choose a reason for hiding this comment

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

🙋

INSERT INTO timeline (post_id, timeline_id) SELECT posts.id, (SELECT id FROM timeline_definition WHERE query = 'local' LIMIT 1) FROM blogs INNER JOIN posts ON posts.blog_id = blogs.id WHERE blogs.instance_id = 1;

-- Add all articles to the the federated timeline
INSERT INTO timeline (post_id, timeline_id) SELECT posts.id, (SELECT id FROM timeline_definition WHERE query = 'all' LIMIT 1) FROM posts;
Copy link
Contributor

Choose a reason for hiding this comment

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

so how come this one isn't enough?

Copy link
Member Author

Choose a reason for hiding this comment

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

These are not the same timelines/feeds, we need to add posts to both of them (do you want me to explain that in a comment too?)

@elegaanz
Copy link
Member Author

Superseded by #704

@elegaanz elegaanz closed this Dec 14, 2019
@elegaanz elegaanz deleted the fix-tl branch December 14, 2019 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Backend Code running on the server C: Bug Something isn't working S: Ready for review This PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty timelines after update
2 participants