feat(automations): add run-now test endpoint and sends log table
Enable immediate automation test runs without waiting for the scheduled hour, expose send history for debugging, and return all SuperAdmin overlay keys on refresh instead of only enable_automation. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,7 +10,7 @@ class SuperAdminProgramSettingsRefreshCommand extends Command
|
||||
protected $signature = 'superadmin:refresh-program-settings
|
||||
{--clear-only : فقط کش last-good را پاک کن}';
|
||||
|
||||
protected $description = 'کش overlay تنظیمات سوپرادمین را پاک/تازه میکند (مثلاً بعد از تغییر enable_automation)';
|
||||
protected $description = 'کش overlay تنظیمات سوپرادمین را پاک/تازه میکند';
|
||||
|
||||
public function handle(): int
|
||||
{
|
||||
@@ -30,11 +30,10 @@ class SuperAdminProgramSettingsRefreshCommand extends Command
|
||||
return self::FAILURE;
|
||||
}
|
||||
|
||||
$items = is_array($result['items'] ?? null) ? $result['items'] : [];
|
||||
$this->info('fetched '.(int) ($result['count'] ?? 0).' setting(s) from SuperAdmin');
|
||||
if (($result['enable_automation'] ?? null) !== null) {
|
||||
$this->line('enable_automation='.$result['enable_automation']);
|
||||
} else {
|
||||
$this->warn('enable_automation missing in SuperAdmin response');
|
||||
foreach ($items as $key => $value) {
|
||||
$this->line(" {$key}={$value}");
|
||||
}
|
||||
|
||||
return self::SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user