From 701e3060bbccaca97d841489a60afcb473fa4fe3 Mon Sep 17 00:00:00 2001 From: Brayan Pereyra Date: Thu, 9 Oct 2025 00:43:07 +0000 Subject: [PATCH] Add Start time and Runtime to ldap cron --- workflow/engine/bin/tasks/cliAuthSources.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/workflow/engine/bin/tasks/cliAuthSources.php b/workflow/engine/bin/tasks/cliAuthSources.php index c89bd2e3d..6d2d10f14 100644 --- a/workflow/engine/bin/tasks/cliAuthSources.php +++ b/workflow/engine/bin/tasks/cliAuthSources.php @@ -64,15 +64,18 @@ function run_auth_sources_sync($command, $args) CLI::logging("Syncronization canceled 🚫\n",null, 'red'); return; } + $startTime = microtime(true); CLI::logging("Workspace \"$workspace\" found.......... ✅\n",null, 'green'); initWorkspace($workspace); executeLdapCron(); - /* - $language = new Language(); - $language->createLanguagePlugin($command[0], $command[1]); - */ + + $endTime = microtime(true); + $runtime = $endTime - $startTime; + CLI::logging("Syncronization completed 🎉🎉🎉\n", null, 'green'); + CLI::logging("Start time: " . date('d-m-Y H:i:s', $startTime) . "\n", null, 'green'); + CLI::logging("Runtime: " . round($runtime, 2) . " seconds\n", null, 'green'); } else { CLI::logging("The command requires the workspace name\n"); }