-
Notifications
You must be signed in to change notification settings - Fork 37
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
wordpress service + event-emitters #487
Conversation
this.wordpressClient = wordpressClient | ||
} | ||
async fetchNews() { | ||
let response = await this.wordpressClient.get('/wp-json/wp/v2/posts/?per_page=100&_embed&_fields=_links.author,_links.wp:featuredmedia,_embedded,title,content.rendered,date,categories&categories=587') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the categories url was configurable via env?
But I see so many categories now, I'm no longer sure.
Maybe we should at least put the ids as const variables at the top of the file for better naming in the actual urls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was just copy&pasta, https://github.com/FAForever/website/pull/487/files#diff-7e4783341040a4ba6619cd0157ccb8d361c450d4ac84148a2fe589414db924ddL22
maybe we can optimize it later? there are for sure other problems, like "options/fields" not used...
9744f5b
to
7435b29
Compare
@@ -101,23 +101,7 @@ exports = module.exports = function (req, res) { | |||
} | |||
|
|||
locals.reportable_members = {}; | |||
const recentMembersPath = 'members/recent.json'; | |||
if (fs.existsSync(recentMembersPath)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we got this covered in #233, when the m2m is ready
module.exports = async () => { | ||
await warmupWordpressCache() | ||
|
||
const wordpressScheduler = new Scheduler('createWordpressCaches', warmupWordpressCache, 60 * 59 * 1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll make all the "magic" numbers into a config once it is somewhat stable and does not change so often.
don't wanna add env-vars directly
@@ -19,8 +19,6 @@ html(lang='en') | |||
|
|||
//- Customise the stylesheet for your site by editing /public/styles/site.sass | |||
link(href="/styles/css/site.min.css?version="+Date.now(), rel="stylesheet") | |||
script(async, defer, data-domain="faforever.com", src="https://plausible.faforever.com/js/plausible.js") | |||
script(src="https://kit.fontawesome.com/33e7e258d3.js" crossorigin='anonymous') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plausible http 404
kit: http 403
don't know why this was loaded, but the newshub still looks okay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plausible is currently disabled on the server.
7435b29
to
b1bf67e
Compare
b1bf67e
to
eb73c7b
Compare
closes #454
related to #480