Files
api/cli.php
T
Jepp9350 b794e95ba9 Refactor and enhance booking, customer, and caching logic
Improved booking handling with unfulfilled booking checks and Slack notifications. Enhanced customer data retrieval with caching optimizations and discount calculations. Added logging, debug capabilities, and expanded Redis functionalities for better data management.
2025-01-21 21:16:42 +01:00

45 lines
1.5 KiB
PHP

<?php
// This script only runs when the program is called from the command line. It is used to run the CLI script.
if (php_sapi_name() !== 'cli') {
exit;
}
$args = $argv;
// If the first argument is 'run', switch to the second argument
if ($args[1] === 'run') {
switch ($args[2]) {
case 'minio-test':
echo "Running the minio test script";
require_once 'tests/minio/minioTest.php';
break;
case 'redis-test':
echo "Running the redis test script";
require_once 'tests/redis/redisTest.php';
break;
case 'redis-logSync-test':
echo "Running the redis log sync test script";
require_once 'tests/redis/redisLogSyncTest.php';
break;
case 'bookingModule-test':
echo "Running the bookingModule test script";
require_once 'tests/bookingModule/bookingModuleTest.php';
break;
case 'slackModule-test':
echo "Running the slack test script";
require_once 'tests/slackModule/SlackModuleTest.php';
break;
case 'bookingSync-test':
echo "Running the bookingSync test script";
require_once 'tests/bookingModule/bookingSyncTest.php';
break;
case 'bookingSync':
require_once 'cron/SyncBookings.php';
break;
case 'SyncLogs':
require_once 'cron/SyncLogs.php';
break;
default:
echo "Invalid script name";
break;
}
}