added automation

This commit is contained in:
2026-08-23 14:16:00 +03:30
parent 0c0b424a69
commit 657c10d1cc
19 changed files with 1372 additions and 0 deletions
@@ -47,6 +47,11 @@ class ReportController extends Controller
public function updatePrise()
{
app(\App\Services\PriceTriggerService::class)->evaluateActive();
try {
app(\App\Services\Automation\AutomationEngine::class)->evaluatePriceMove();
} catch (\Throwable $e) {
report($e);
}
return response()->json();
}
@@ -126,10 +131,20 @@ class ReportController extends Controller
if (app()->runningInConsole()) {
app(\App\Services\ConditionalOrderService::class)->evaluateFromLastPrice($pricePayload);
app(\App\Services\PriceTriggerService::class)->evaluateActive($pricePayload);
try {
app(\App\Services\Automation\AutomationEngine::class)->evaluatePriceMove($pricePayload);
} catch (\Throwable $e) {
report($e);
}
} else {
dispatch(function () use ($pricePayload) {
app(\App\Services\ConditionalOrderService::class)->evaluateFromLastPrice($pricePayload);
app(\App\Services\PriceTriggerService::class)->evaluateActive($pricePayload);
try {
app(\App\Services\Automation\AutomationEngine::class)->evaluatePriceMove($pricePayload);
} catch (\Throwable $e) {
report($e);
}
})->afterResponse();
}
}