Introduced cron tasks for syncing user economic customer details and discounts. Enhanced caching mechanisms for users and departments, added Slack messaging capabilities, and updated CLI/script routing for better flexibility. New routes and utility methods improve cron execution and logging.
22 lines
528 B
PHP
22 lines
528 B
PHP
<?php
|
|
/**
|
|
* This script is used to sync bookings from the remote API to the local database.
|
|
* It is run as a cron job.
|
|
*
|
|
* index.php run bookingSync
|
|
*/
|
|
|
|
// prevent direct access
|
|
|
|
use objects\bookings_o;
|
|
|
|
if (!defined('WD')) {
|
|
exit;
|
|
}
|
|
$start = microtime(true);
|
|
// Sync the bookings
|
|
$bookings_o = new bookings_o();
|
|
$bookings_o->syncBookings();
|
|
$end = microtime(true);
|
|
//$slack = new \classes\slack();
|
|
//$slack->send_message("The booking sync script has finished. It took " . round($end - $start, 2) . " seconds to run.");
|