Skip to content

Conversation

@simonLeary42
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR consolidates common initialization code for worker scripts by introducing a shared workers/init.php file. This reduces code duplication across multiple worker files and standardizes the initialization process.

  • Centralized worker initialization in a new workers/init.php file
  • Standardized the _die() function to accept an exit code parameter
  • Refactored existing worker files to use the shared initialization

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
workers/init.php New shared initialization file that sets up $_SERVER variables, loads dependencies, imports commonly used classes, and defines a standardized _die() helper function
workers/update-ldap-cache.php Replaced inline initialization code with include of init.php; updated help message output to use _die() with exit code 0
workers/remove-users-from-group.php Replaced inline initialization code with include of init.php; updated all _die() calls to include explicit exit codes
workers/group_user_request_owner_reminder.php Replaced inline initialization code with include of init.php
workers/clear-audit-log.php Replaced inline initialization code with include of init.php

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@simonLeary42 simonLeary42 force-pushed the worker-init branch 3 times, most recently from cb70c8f to 9a04206 Compare November 26, 2025 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants