Add more reference example modules (cron, worker, datatable, acl, firewall, integration, language pack)#2
Open
jorikfon wants to merge 1 commit into
Open
Add more reference example modules (cron, worker, datatable, acl, firewall, integration, language pack)#2jorikfon wants to merge 1 commit into
jorikfon wants to merge 1 commit into
Conversation
Demonstrates scheduled work two idiomatic ways, both funneling through one deduplicated launcher so the job never stacks: - createCronTasks() appends an every-minute crontab line running the starter - getModuleWorkers() registers the worker with CHECK_BY_PID_NOT_ALERT - the starter calls Processes::processPHPWorker() (dedup by process title) - onAfterModuleEnable/Disable call CronConf::reStart() to regenerate cron Verified live on MikoPBX 2026.2.118: enable generates the crontab line and the worker runs on schedule (distinct PIDs, no overlap — dedup no-op proven); disable removes the line and halts activity with no orphans. All Core APIs traced to source; php -l clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second batch of exemplary reference modules, each built against primary Core source and verified live on a real MikoPBX (2026.2.118). Targets MikoPBX 2025.1.1, PHP 8.4, Phalcon 5.9.3. Modules are added incrementally as each is verified.
Verified
createCronTasks()+ a supervisor-registered worker (CHECK_BY_PID_NOT_ALERT), funneled throughProcesses::processPHPWorker()for dedup;onAfterModuleEnable/Disable→CronConf::reStart(). Live-verified full lifecycle (enable→crontab line + scheduled runs with distinct PIDs, dedup no-op proven; disable→line removed, no orphans).In progress (will be pushed to this branch as verified)