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 new modules loaded event #7463

Merged
merged 15 commits into from
Jun 16, 2024
Merged

Add new modules loaded event #7463

merged 15 commits into from
Jun 16, 2024

Conversation

sjpadgett
Copy link
Sponsor Member

  • Notify any listeners that modules are loaded.
  • Include modules that failed and reason in modules event return array.

Fixes #7462

Short description of what this resolves:

Refactor our src/Core/ModulesApplication.php bootstrapCustomModules method to use a new method isFileReadableWithRetry() to retry if readable fails. Default is three tries. I fear these type of problem occur more often than we notice:

  • File System Latency
  • File locks
  • Disk I/O Issues

I'm still looking into if or when, file read/write errors may occur. I don't know of openemr using file locks anywhere and if anything maybe file contention or timeouts is more likely. However you look at it, it is an interesting issue.
I will still, for now, keep the disable module if this check fails. I'd like to add a new runtime status to the modules entry in modules table but I'm still thinking over a possible module rehab/monitor backend task application.

- Notify any listeners that modules are loaded.
- Inlude modules that failed and reason in enabled modules event return array.
@sjpadgett sjpadgett added the Module Support Use if effects modules label Jun 2, 2024
@sjpadgett sjpadgett modified the milestone: 7.0.2.2 Jun 2, 2024
@sjpadgett
Copy link
Sponsor Member Author

@adunsulag Do you think I ought to keep or not the disable module on file read failure? I still have one more push to add license etc. then i'll send to a site to test.

@sjpadgett
Copy link
Sponsor Member Author

Decided to remove module disable. Will merge after a few more tests.

@sjpadgett
Copy link
Sponsor Member Author

Installed on an effected site so will wait until I see what happens. Strange for the file read to fail and must have something to do with environment or our app holding it's tongue just right.:)
I sure wish I could recreate locally or anywhere else.

Etherfax Ajax/Fetch refactors for readabilty and funtional
…d validation

rework search
rework and refactor several classes for readability and consoladation
remove one class from refactor
remove old csv import
@sjpadgett
Copy link
Sponsor Member Author

Working towards international support for the weno module openemr version. I've been able to cut full pharmacy of around 92,300 records download and import to table to around 25seconds. A long way from original time of 1.5+ minutes!

Greatly improved search engine and getting closer to class cleanup to remove unused or spaghetti code and give better clarity for those that follow me.

I'll still have more code reduction coming in next day or two.

If anyone wants to play with then it's on GAMMA dev demo. You have credentials if not let me know and I'll send.
A lot of etherfax here too. It's working very nicely. Again let me know for credentials. All these accounts are setup for the project to use going forward for lifecycle updates.

@sjpadgett
Copy link
Sponsor Member Author

image

…hanges

* 'master' of https://github.com/openemr/openemr:
  bug: fix typo in 837I script (openemr#7469)
  bug: fix variable typo in messages.php (openemr#7466)
@stephenwaite
Copy link
Sponsor Member

smaller_excited_elephant

new script to update assigned pharmacies from weno widget
persist search filters to be reused.
@sjpadgett
Copy link
Sponsor Member Author

image

add refresh after pharmacy update
…hanges

* 'master' of https://github.com/openemr/openemr:
  fix: use temp files dir for htmlpurify serializer path (openemr#7476)
  fix: webroot typo documents-go portal home (openemr#7474)
  add insert value to google_signin_email column in users table (openemr#7472)
fix provider password for prescription log.
safegaurd session on ajax
add upgrade sql script
@sjpadgett sjpadgett merged commit e873bb6 into openemr:master Jun 16, 2024
25 checks passed
sjpadgett added a commit to sjpadgett/openemr that referenced this pull request Jun 16, 2024
* Add new module loaded event
- Notify any listeners that modules are loaded.
- Inlude modules that failed and reason in enabled modules event return array.

* Remove disable module on unreadable bootstrap after 3 tries.
Document license and copyrights

* Redesign Weno pharmacy search to add additional options
Etherfax Ajax/Fetch refactors for readabilty and funtional

* more weno search refactor

* redevelop csv pharmacy import using league/csv for better coverage and validation
rework search
rework and refactor several classes for readability and consoladation
remove one class from refactor
remove old csv import

* modify search filter
warning fix

* more neat search stuff

* an update to implement pharmacy select from widget or Choices.
new script to update assigned pharmacies from weno widget
persist search filters to be reused.

* remove warnings alert since not needed

* verbiage change
add refresh after pharmacy update

* Fix acl to only allow widget if demo write vecause must add pharmacies.
fix provider password for prescription log.
safegaurd session on ajax

* cleanup
add upgrade sql script

* php warning fixes

(cherry picked from commit e873bb6)
@sjpadgett sjpadgett deleted the MM_changes branch June 22, 2024 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module Support Use if effects modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need module bootstrap status events
2 participants