-
Notifications
You must be signed in to change notification settings - Fork 7
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
Feature/new66 #4932
base: master
Are you sure you want to change the base?
Feature/new66 #4932
Conversation
…hat does the actual auto archiving
…ction of nodes more tightly
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.
Rather than a separate module, can we combine everything into one module?
@Ravi-jud is working on the delete feature at web/modules/custom/jcc_newslinks/jcc_newslinks.module.
Here the use case is quite different, as Kiran revealed, it is a rarely used and she does not want a cron job, and that is why all the operations will be only triggered if the admin user goes to this path: /admin/jcc_news_archive. Making it a standalone module will not only save computational resources but also enable us to handle other similar tasks in a way where the business logic is clear and easy to maintain. Thanks!
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Mel Wong ***@***.***>
Sent: Tuesday, January 28, 2025 2:35:56 PM
To: JudicialCouncilOfCalifornia/trialcourt ***@***.***>
Cc: Wu, Alex ***@***.***>; Author ***@***.***>
Subject: Re: [JudicialCouncilOfCalifornia/trialcourt] Feature/new66 (PR #4932)
@melwong-jcc commented on this pull request.
Rather than a separate module, can we combine everything into one module?
@Ravi-jud<https://github.com/Ravi-jud> is working on the delete feature at web/modules/custom/jcc_newslinks/jcc_newslinks.module.
—
Reply to this email directly, view it on GitHub<#4932 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BIKE4R62WY5QBLHJMGTMJN32NAA4ZAVCNFSM6AAAAABWBND452VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKNZZGU3DOMJWGM>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Though it's a different category for the same content type, it still can be combined into bundle of features for everything Newslinks related. I don't see a need for a separate module if it all pertains for the same content type unless you are saying that the cron job is the conflict. Not a big issue either since the code is fine. Just I prefer to have related features bundled unless they must absolutely need to be installed separately. We need to be mindful on how much should be module vs our core. If you feel strongly to create a separate module, you should be okay to proceed. |
Thank you for revealing your thinkings. I agree that in most cases we should try to bundle related code together, however, this is a code and rare use case, and what I have put in the code is like create a backdoor and allow admin to use it when it is really needed. This logics, if bundled with others, then it will consume significant CPU power unnecessarily thus will drag down our sites' performance, because in that way the program logic will evaluate a condition, which essentially pulls the back end and tests for if there are any news release links older than five years, before proceeding to execute, no matter if that condition has been met or not. As you can tell, the backend pulling means at least a table scan plus network delay, and the enumerating of those records in memory also means some cost of CPU cycles. Yes, making our code maintainable is important, but even more important is the efficiency of our program. Hope you can approve this PR. Thanks! |
This is the PR that handles the task to archive all the news release links older than 5 years, by going to this route: /admin/jcc_news_archive, after having the custom module jcc_news_archive installed.