|
10737
|
213
|
38
|
2026-04-14T08:56:23.735114+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776156983735_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditFV faVsco.js vViewNavigateCodeLara PhpStormFileEditFV faVsco.js vViewNavigateCodeLaravelRefactorToolsWindow#11894 on JY-18909-automated-reports-ask-iminny K vHelpProject vD ControllersDJAPITAUThID CustomerApilinternalKOSKSettings• TelephonyD Webhook> D Hubspot> C IntegrationAppSubsc© ActivityProviderCont© Activity Transcription© BaseController.phpCalendarController.p© ReportController.phpSoftphoneWebhookC© AbstractController.pnp• CommentContextInterfa© ConferencesOptlnOutC,© Controller.phpExportController.php© FrontendController.php€ FrontendControllerTrait© GeocodingController.ph© HealthCheckController.fLiveCoachController.ph/(c) Missino eamcontroler.Mobllecontroller.php© NotificationController.pt© NotificationProviderConPlaybackController.phpPlaylistController.php© PusherController.php© SlackController.php© SupportController.php© TeamSetupController.pt© UserAutomatedReportsi© WelcomeController.php'Micc eware> M Requests› D Resources› _ Responses0 SerializersC Transformers© Kernel.php© PlaylistTrackResourceTraitT ValidateCrmConnectionRes> D IntegrationslinteractionsOJobs> M Activitv> M AiAutomationAjReportsD AudioD AutomatedReports© RequestGenerateAskJin© RequestGenerateReport© SendReportJob.php© ReportController.php© AutomatedReportsCommand.php© AutomatedReportsService.phpJiminnybebuecommana.ong© AddLayoutEntities.phpAutomatedReportsSendCommand.phpC Team.php© AutomatedReportsRepository.php© TrackProviderInstalledEvent.php© ActivityLogged.phpC RequestGenerateAskJiminnyReportJob.php xRequestGeneratekeporJob.ong© AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique opublic function handle(9598100101102103104105106107108109110111112113114115116117118119120$savedSearch = $automatedReport->getSavedSearchO);if ($savedSearch === null) {s Logger->warningtselt::L0G_PREFIX •'automatedReportUuid' => Sthis-›reportUuidSkipped, saved search not found',l1);lecuri$prompt = $automatedReport->getAskAnythingPrompt();if ($prompt === null) {$logger->warning(self::LOG_PREFIX •'aucomatedkeporcuu1d = schis->reporcuuld.Skipped, ask anything prompt not found',1):rerurnr$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status'= AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService: :MEDIA_TYPE_PDF,Sactivitylds = SactivityService->getActävityIdsFon gavedSearch (savedSearch: $savedSearch,usel. peredtor,):$Logger->info(self::LOG_PREFIX . ' Fetched activity IDs', I'automatedReportUvid' = $this->reportUuid,'activityCount' => count($activityIds),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {$this->failReport( reason: AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);$Logger→>info(self::LOG_PREFIX . ' Not enough activities, skipped', ['automatedReportUuid' = $this->reportUvid,'activityCount' => count($activityIds),1);Tecurtin$payLoad = $reportService->getAskJiminnyGenerateReportPayLoad(auсопасеокерort. фаuсопасеакерогь,reoortkesulr, ounse>redorckesulr.Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log= laravel.log< console PRODAl console (EU]© AskJiminnyReportActivityService.phpA SF ljiminny@localhost]A HS_local [jiminny@localhost]A console [STAGING] XC RequestGenerateAskJiminnyReportJobTest.phpPlayground519520v 5215245235245255275285291550155745335345355365375385395405415425435445455465475485495505515521553554555550557558559561563X:Auto vsa.*,T.owner 1o rkum social accounus salJulrusers u on urio = sarsoclaote olJuir realls t1..n<->1: on t.id = u.team idWHERE U.team_id = 1 and sa.provider = 'salesforce':Sajiminny016 A13 M13 A Vselect * from teams where id = 1;select * fromgroups g JOIN playbooks p 1.n<->1: on g.playbook_id = p.id wherselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * fromusers where team_1d = 1;select * TroIusers were 10 =100.select * Tr01crm_profiles where user_id = 7160;select * fromTeacures,select# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_]# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm_configuration_id = 1 and type ='conference'# and crm_provider_id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLURUER Dy 1d desc)select * from activities where id = 54747783; # 00U0400000pCzojMACselect p.lo, p.accivicy-type, pe.10, pc.nameFROM playbooks pjoin playbook_categories pc 1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'evSELECT * FROM crm_field_values WHERE crm_field_id = 4;select * from crm_layouts cl join playbook_layouts pl1<->1.n: on cl.id = pl.:wnere crm_contiguration_1d = 1 and pl.playdook_10 = 1/5;select x trol reails?SELECT r.* FROM automated_reports rjoin teams t on r.teamid = t.idWHERE r.frequeney = 'daily'and r.status = 1AND t.status = 'active'AND (r.exRices.at >= now() OR r.expinesat IS NULL):select * from automated_report_results where reRontaid IN (18, 33);select * tron acmur searches where 10 = 107521566 Vselect * from activity_search_filters where activity_search_id = 10932;S0/select * from568select * from569automated_report_results where ceRontaid IN (34, 35);Support Daily • in 3h 4mARequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:56:23CascadeFixing ReportControlle• Automated Report N• Automated Report L+D..3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)w[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsauconacedkeporcuuld, actlvicycount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportUuid, activityCountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITIES.4b. Error path (exception):[AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService - the requestParams built from the saved search are not logged (only acalvity countRequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate - so if we fail at count check, we never see the payloadIcan add loaaina to expose the apolied filters and the actual activity IDs when the count is low. Want me to addthat?Askino •uestion• What would you like to improve?What would you like to improve?Loo ne aoolee Ters recuestrarams. rrom the saveo searctAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tincludedbolLog filters + activity IDs in AskJiminnyReportActivityServiceOther answer+ <> CodeClaude Sonnet 4.6SkipW Windsur leams98.0.uir-o( 4 spaces...
|
NULL
|
2855242260088565745
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEditFV faVsco.js vViewNavigateCodeLara PhpStormFileEditFV faVsco.js vViewNavigateCodeLaravelRefactorToolsWindow#11894 on JY-18909-automated-reports-ask-iminny K vHelpProject vD ControllersDJAPITAUThID CustomerApilinternalKOSKSettings• TelephonyD Webhook> D Hubspot> C IntegrationAppSubsc© ActivityProviderCont© Activity Transcription© BaseController.phpCalendarController.p© ReportController.phpSoftphoneWebhookC© AbstractController.pnp• CommentContextInterfa© ConferencesOptlnOutC,© Controller.phpExportController.php© FrontendController.php€ FrontendControllerTrait© GeocodingController.ph© HealthCheckController.fLiveCoachController.ph/(c) Missino eamcontroler.Mobllecontroller.php© NotificationController.pt© NotificationProviderConPlaybackController.phpPlaylistController.php© PusherController.php© SlackController.php© SupportController.php© TeamSetupController.pt© UserAutomatedReportsi© WelcomeController.php'Micc eware> M Requests› D Resources› _ Responses0 SerializersC Transformers© Kernel.php© PlaylistTrackResourceTraitT ValidateCrmConnectionRes> D IntegrationslinteractionsOJobs> M Activitv> M AiAutomationAjReportsD AudioD AutomatedReports© RequestGenerateAskJin© RequestGenerateReport© SendReportJob.php© ReportController.php© AutomatedReportsCommand.php© AutomatedReportsService.phpJiminnybebuecommana.ong© AddLayoutEntities.phpAutomatedReportsSendCommand.phpC Team.php© AutomatedReportsRepository.php© TrackProviderInstalledEvent.php© ActivityLogged.phpC RequestGenerateAskJiminnyReportJob.php xRequestGeneratekeporJob.ong© AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique opublic function handle(9598100101102103104105106107108109110111112113114115116117118119120$savedSearch = $automatedReport->getSavedSearchO);if ($savedSearch === null) {s Logger->warningtselt::L0G_PREFIX •'automatedReportUuid' => Sthis-›reportUuidSkipped, saved search not found',l1);lecuri$prompt = $automatedReport->getAskAnythingPrompt();if ($prompt === null) {$logger->warning(self::LOG_PREFIX •'aucomatedkeporcuu1d = schis->reporcuuld.Skipped, ask anything prompt not found',1):rerurnr$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status'= AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService: :MEDIA_TYPE_PDF,Sactivitylds = SactivityService->getActävityIdsFon gavedSearch (savedSearch: $savedSearch,usel. peredtor,):$Logger->info(self::LOG_PREFIX . ' Fetched activity IDs', I'automatedReportUvid' = $this->reportUuid,'activityCount' => count($activityIds),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {$this->failReport( reason: AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);$Logger→>info(self::LOG_PREFIX . ' Not enough activities, skipped', ['automatedReportUuid' = $this->reportUvid,'activityCount' => count($activityIds),1);Tecurtin$payLoad = $reportService->getAskJiminnyGenerateReportPayLoad(auсопасеокерort. фаuсопасеакерогь,reoortkesulr, ounse>redorckesulr.Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log= laravel.log< console PRODAl console (EU]© AskJiminnyReportActivityService.phpA SF ljiminny@localhost]A HS_local [jiminny@localhost]A console [STAGING] XC RequestGenerateAskJiminnyReportJobTest.phpPlayground519520v 5215245235245255275285291550155745335345355365375385395405415425435445455465475485495505515521553554555550557558559561563X:Auto vsa.*,T.owner 1o rkum social accounus salJulrusers u on urio = sarsoclaote olJuir realls t1..n<->1: on t.id = u.team idWHERE U.team_id = 1 and sa.provider = 'salesforce':Sajiminny016 A13 M13 A Vselect * from teams where id = 1;select * fromgroups g JOIN playbooks p 1.n<->1: on g.playbook_id = p.id wherselect * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * fromusers where team_1d = 1;select * TroIusers were 10 =100.select * Tr01crm_profiles where user_id = 7160;select * fromTeacures,select# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_]# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm_configuration_id = 1 and type ='conference'# and crm_provider_id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLURUER Dy 1d desc)select * from activities where id = 54747783; # 00U0400000pCzojMACselect p.lo, p.accivicy-type, pe.10, pc.nameFROM playbooks pjoin playbook_categories pc 1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'evSELECT * FROM crm_field_values WHERE crm_field_id = 4;select * from crm_layouts cl join playbook_layouts pl1<->1.n: on cl.id = pl.:wnere crm_contiguration_1d = 1 and pl.playdook_10 = 1/5;select x trol reails?SELECT r.* FROM automated_reports rjoin teams t on r.teamid = t.idWHERE r.frequeney = 'daily'and r.status = 1AND t.status = 'active'AND (r.exRices.at >= now() OR r.expinesat IS NULL):select * from automated_report_results where reRontaid IN (18, 33);select * tron acmur searches where 10 = 107521566 Vselect * from activity_search_filters where activity_search_id = 10932;S0/select * from568select * from569automated_report_results where ceRontaid IN (34, 35);Support Daily • in 3h 4mARequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:56:23CascadeFixing ReportControlle• Automated Report N• Automated Report L+D..3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)w[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsauconacedkeporcuuld, actlvicycount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportUuid, activityCountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITIES.4b. Error path (exception):[AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService - the requestParams built from the saved search are not logged (only acalvity countRequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate - so if we fail at count check, we never see the payloadIcan add loaaina to expose the apolied filters and the actual activity IDs when the count is low. Want me to addthat?Askino •uestion• What would you like to improve?What would you like to improve?Loo ne aoolee Ters recuestrarams. rrom the saveo searctAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tincludedbolLog filters + activity IDs in AskJiminnyReportActivityServiceOther answer+ <> CodeClaude Sonnet 4.6SkipW Windsur leams98.0.uir-o( 4 spaces...
|
NULL
|
|
10738
|
213
|
39
|
2026-04-14T08:56:26.352509+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776156986352_m2.jpg...
|
PhpStorm
|
faVsco.js – RequestGenerateAskJiminnyReportJob.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
https://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105
https://crmsandbox.zoho.com/crm/
https://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080
https://crm.zoho.com/crm/
org3469620
SELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;
select * from users where email LIKE "%mobile_automation_%";
select * from social_accounts where sociable_id IN (2228);
select * from crm_profiles where user_id IN (2222,2223,2226,2227);
select * from teams order by id desc;
SELECT * FROM users WHERE id = 2229;
SELECT * FROM crm_profiles WHERE user_id = 2229;
select * from opportunities where crm_configuration_id = 88;
select * from crm_fields where crm_configuration_id = 88;
select * from crm_profiles where crm_configuration_id = 88;
SELECT * FROM teams WHERE id = 1;
SELECT * FROM users WHERE id = 143;
SELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;
https://app.staging.jiminny.com/ondemand?
min_duration=1
&
only_recorded=1
&
user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e
&
sequence_number=2
select * from users where team_id = 1 and email like '%stoyan%'
select * from coaching_feedbacks;
select * from teams;
SELECT * FROM users WHERE team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from users where id = 143;
SELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
select * from users where team_id = 2;
select * from activities where crm_configuration_id = 39
and activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'
AND user_id = 143
order by id desc;
# [PASSWORD_DOTS]
select * from teams where id = 142; # 2312, 126
select * from team_settings;
select * from users where team_id = 142; # 21642
SELECT * FROM social_accounts WHERE sociable_id = 21642;
SELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;
select * from crm_profiles where id IN (93);
select * from invitations;
select * from team_features where team_id = 1;
SELECT * FROM crm_configurations WHERE id = 126;
select * from accounts where crm_configuration_id = 126 order by id desc;
select * from leads where crm_configuration_id = 126 order by id desc;
select * from contacts where crm_configuration_id = 126 order by id desc;
select * from opportunities where crm_configuration_id = 126 order by id desc;
select * from crm_profiles where crm_configuration_id = 126 order by id desc;
select * from crm_fields where crm_configuration_id = 126 # 11060
# and type IN ('picklist', 'status')
# and object_type = 'task'
order by id desc;
# 5731,5732,5733
select DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;
select * from crm_layouts where crm_configuration_id = 126 order by id desc;
SELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);
select * from stages where crm_configuration_id = 126 order by id desc;
select * from business_processes where crm_configuration_id = 126 order by id desc;
select * from business_process_stages where business_process_id IN (76,75,74,73);
select * from playbooks where team_id = 142;
select * from playbook_layouts where playbook_id IN (108);
SELECT * FROM playbook_categories WHERE playbook_id IN (108);
select * from teams where id = 130;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 2
and sa.provider = 'hubspot';
SELECT * FROM activities
WHERE crm_configuration_id = 110;
select * from teams;
select * from crm_configurations;
SELECT * FROM activities WHERE id = 628773;
SELECT * FROM crm_profiles WHERE user_id = 1460;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from teams;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from teams where id = 145;
select * from crm_configurations where id = 129;
select * from social_accounts where sociable_id = 2317;
SELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;
select * from teams where id = 1;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;
SELECT * FROM crm_layout_entities WHERE id = 5507;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');
select * from teams;
select * from activities where crm_configuration_id = 14;
SELECT * FROM social_accounts where provider = 'copper';
select * from activities where id = 628467;
select * from participants where activity_id = 628467;
SELECT * FROM contacts WHERE id = 3969;
SELECT * FROM accounts WHERE id = 177;
SELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;
# [PASSWORD_DOTS] BH
select * from teams where id = 36;
SELECT * FROM crm_configurations WHERE id = 21;
select * from activities where crm_configuration_id = 21 and id = 607901;
select * from activities where crm_configuration_id = 21;
select * roles;
select * from permissions;
select * from permission_role where permission_id = 226;
select * from migrations order by id desc;
# mercury
# neptune
# earth
select * from teams;
select * from teams where id = 19;
select * from teams where id = 27;
select * from users where team_id = 27;
SELECT * FROM crm_configurations WHERE id = 42;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from activities where id = 631461;
SELECT * FROM crm_field_values WHERE crm_field_id = 180;
select * from teams where id = 2;
SELECT * FROM social_accounts WHERE sociable_id = 89;
SELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273
select * from activity_summary_logs where activity_id = 634273;
select * from sidekick_settings where team_id = 2;
select * from teams; # 2, 2
SELECT * FROM crm_configurations WHERE team_id = 2; # 2
select * from team_features where team_id = 2;
select * from features;
SELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';
SELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;
select * from automated_reports order by id desc;
select * from automated_report_results order by id desc;
select * from users where team_id = 1 and id IN (7160, 3248);
select * from migrations order by id desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1 and sa.provider = 'salesforce';
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 565;
select * from playbooks where team_id = 1;
select * from playbooks where id = 175;
select * from playbook_categories where playbook_id = 175;
select * from users where team_id = 1;
select * from users where id = 7160;
select * from crm_profiles where user_id = 7160;
select * from features;
select
*
# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,
# crm_configuration_id, crm_provider_id, transcription_id, status
from activities where crm_configuration_id = 1 and type = 'conference'
# and crm_provider_id IS NOT NULL
and provider != 'uploader' and actual_start_time IS NOT NULL
ORDER by id desc;
select * from activities where id = 54747783; # 00UO400000pCzojMAC
select p.id, p.activity_type, pc.id, pc.name
FROM playbooks p
join playbook_categories pc on p.id = pc.playbook_id
where p.team_id = 1 and p.activity_type = 'event';
SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';
SELECT * FROM crm_field_values WHERE crm_field_id = 4;
select * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id
where crm_configuration_id = 1 and pl.playbook_id = 175;
select * from teams;
SELECT r.* FROM automated_reports r
join teams t on r.team_id = t.id
WHERE r.frequency = 'daily'
and r.status = 1
AND t.status = 'active'
AND (r.expires_at >= now() OR r.expires_at IS NULL);
select * from automated_report_results where report_id IN (18, 33);
select * from activity_searches where id = 10932;
select * from activity_search_filters where activity_search_id = 10932;
select * from automated_reports;
select * from automated_report_results where report_id IN (34, 35);
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14960937,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.76171875,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"bounds":{"left":0.7796875,"top":0.017361112,"width":0.12109375,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.4203125,"top":0.1736111,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.43164062,"top":0.17222223,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.44023436,"top":0.17222223,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.45,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.46015626,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.47304687,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.4832031,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.4933594,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.50625,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.5191406,"top":0.10763889,"width":0.028515626,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.5503906,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.56328124,"top":0.10763889,"width":0.034765624,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.6738281,"top":0.10763889,"width":0.033203125,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"bounds":{"left":0.65117186,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.66484374,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.6785156,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.6917969,"top":0.12777779,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.70039064,"top":0.12777779,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34, 35);","depth":4,"value":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34, 35);","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.0140625,"top":0.041666668,"width":0.028515626,"height":0.021527778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
3403831770800610104
|
6686649039917069389
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
https://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105
https://crmsandbox.zoho.com/crm/
https://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080
https://crm.zoho.com/crm/
org3469620
SELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;
select * from users where email LIKE "%mobile_automation_%";
select * from social_accounts where sociable_id IN (2228);
select * from crm_profiles where user_id IN (2222,2223,2226,2227);
select * from teams order by id desc;
SELECT * FROM users WHERE id = 2229;
SELECT * FROM crm_profiles WHERE user_id = 2229;
select * from opportunities where crm_configuration_id = 88;
select * from crm_fields where crm_configuration_id = 88;
select * from crm_profiles where crm_configuration_id = 88;
SELECT * FROM teams WHERE id = 1;
SELECT * FROM users WHERE id = 143;
SELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;
https://app.staging.jiminny.com/ondemand?
min_duration=1
&
only_recorded=1
&
user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e
&
sequence_number=2
select * from users where team_id = 1 and email like '%stoyan%'
select * from coaching_feedbacks;
select * from teams;
SELECT * FROM users WHERE team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from users where id = 143;
SELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
select * from users where team_id = 2;
select * from activities where crm_configuration_id = 39
and activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'
AND user_id = 143
order by id desc;
# [PASSWORD_DOTS]
select * from teams where id = 142; # 2312, 126
select * from team_settings;
select * from users where team_id = 142; # 21642
SELECT * FROM social_accounts WHERE sociable_id = 21642;
SELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;
select * from crm_profiles where id IN (93);
select * from invitations;
select * from team_features where team_id = 1;
SELECT * FROM crm_configurations WHERE id = 126;
select * from accounts where crm_configuration_id = 126 order by id desc;
select * from leads where crm_configuration_id = 126 order by id desc;
select * from contacts where crm_configuration_id = 126 order by id desc;
select * from opportunities where crm_configuration_id = 126 order by id desc;
select * from crm_profiles where crm_configuration_id = 126 order by id desc;
select * from crm_fields where crm_configuration_id = 126 # 11060
# and type IN ('picklist', 'status')
# and object_type = 'task'
order by id desc;
# 5731,5732,5733
select DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;
select * from crm_layouts where crm_configuration_id = 126 order by id desc;
SELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);
select * from stages where crm_configuration_id = 126 order by id desc;
select * from business_processes where crm_configuration_id = 126 order by id desc;
select * from business_process_stages where business_process_id IN (76,75,74,73);
select * from playbooks where team_id = 142;
select * from playbook_layouts where playbook_id IN (108);
SELECT * FROM playbook_categories WHERE playbook_id IN (108);
select * from teams where id = 130;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 2
and sa.provider = 'hubspot';
SELECT * FROM activities
WHERE crm_configuration_id = 110;
select * from teams;
select * from crm_configurations;
SELECT * FROM activities WHERE id = 628773;
SELECT * FROM crm_profiles WHERE user_id = 1460;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from teams;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from teams where id = 145;
select * from crm_configurations where id = 129;
select * from social_accounts where sociable_id = 2317;
SELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;
select * from teams where id = 1;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;
SELECT * FROM crm_layout_entities WHERE id = 5507;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');
select * from teams;
select * from activities where crm_configuration_id = 14;
SELECT * FROM social_accounts where provider = 'copper';
select * from activities where id = 628467;
select * from participants where activity_id = 628467;
SELECT * FROM contacts WHERE id = 3969;
SELECT * FROM accounts WHERE id = 177;
SELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;
# [PASSWORD_DOTS] BH
select * from teams where id = 36;
SELECT * FROM crm_configurations WHERE id = 21;
select * from activities where crm_configuration_id = 21 and id = 607901;
select * from activities where crm_configuration_id = 21;
select * roles;
select * from permissions;
select * from permission_role where permission_id = 226;
select * from migrations order by id desc;
# mercury
# neptune
# earth
select * from teams;
select * from teams where id = 19;
select * from teams where id = 27;
select * from users where team_id = 27;
SELECT * FROM crm_configurations WHERE id = 42;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from activities where id = 631461;
SELECT * FROM crm_field_values WHERE crm_field_id = 180;
select * from teams where id = 2;
SELECT * FROM social_accounts WHERE sociable_id = 89;
SELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273
select * from activity_summary_logs where activity_id = 634273;
select * from sidekick_settings where team_id = 2;
select * from teams; # 2, 2
SELECT * FROM crm_configurations WHERE team_id = 2; # 2
select * from team_features where team_id = 2;
select * from features;
SELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';
SELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;
select * from automated_reports order by id desc;
select * from automated_report_results order by id desc;
select * from users where team_id = 1 and id IN (7160, 3248);
select * from migrations order by id desc;
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 1 and sa.provider = 'salesforce';
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 565;
select * from playbooks where team_id = 1;
select * from playbooks where id = 175;
select * from playbook_categories where playbook_id = 175;
select * from users where team_id = 1;
select * from users where id = 7160;
select * from crm_profiles where user_id = 7160;
select * from features;
select
*
# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,
# crm_configuration_id, crm_provider_id, transcription_id, status
from activities where crm_configuration_id = 1 and type = 'conference'
# and crm_provider_id IS NOT NULL
and provider != 'uploader' and actual_start_time IS NOT NULL
ORDER by id desc;
select * from activities where id = 54747783; # 00UO400000pCzojMAC
select p.id, p.activity_type, pc.id, pc.name
FROM playbooks p
join playbook_categories pc on p.id = pc.playbook_id
where p.team_id = 1 and p.activity_type = 'event';
SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';
SELECT * FROM crm_field_values WHERE crm_field_id = 4;
select * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id
where crm_configuration_id = 1 and pl.playbook_id = 175;
select * from teams;
SELECT r.* FROM automated_reports r
join teams t on r.team_id = t.id
WHERE r.frequency = 'daily'
and r.status = 1
AND t.status = 'active'
AND (r.expires_at >= now() OR r.expires_at IS NULL);
select * from automated_report_results where report_id IN (18, 33);
select * from activity_searches where id = 10932;
select * from activity_search_filters where activity_search_id = 10932;
select * from automated_reports;
select * from automated_report_results where report_id IN (34, 35);
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
10737
|
|
10739
|
212
|
30
|
2026-04-14T08:56:26.379824+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776156986379_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 4 m100% CTue 14 Apr 11:56:26ec2-user@ip-10-30-93-249:~DOCKER• 8812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
-8690176156644303905
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 4 m100% CTue 14 Apr 11:56:26ec2-user@ip-10-30-93-249:~DOCKER• 8812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
|
10740
|
212
|
31
|
2026-04-14T08:56:29.896144+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776156989896_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 4 m100% CTue 14 Apr 11:56:29ec2-user@ip-10-30-93-249:~DOCKER9812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453eбc4054", "teamId" :1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id" :"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"})root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
3735129484928678401
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 4 m100% CTue 14 Apr 11:56:29ec2-user@ip-10-30-93-249:~DOCKER9812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453eбc4054", "teamId" :1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id" :"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"})root@73b64f5d54a3:/home/jiminny#l...
|
10739
|
|
10741
|
213
|
40
|
2026-04-14T08:56:29.887463+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776156989887_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditFV faVsco.js vViewNavigateCodeLara PhpStormFileEditFV faVsco.js vViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProject vD ControllersDJAPID AuthD CustomerApilinternalKOSKSettings• TelephonyD Webhook> D Hubspot> C IntegrationAppSubsc© ActivityProviderCont© Activity Transcription© BaseController.phpCalendarController.p© ReportController.phpSoftphoneWebhookC© AbstractController.pnp• CommentContextInterfa© ConferencesOptlnOutC,© Controller.phpExportController.php© FrontendController.php€ FrontendControllerTrait© GeocodingController.ph© HealthCheckController.fLiveCoachController.ph/(c) Missino eamcontroller.Mobllecontroller.php© NotificationController.pt© NotificationProviderConPlaybackController.phpPlaylistController.php© PusherController.php© SlackController.php© SupportController.php© TeamSetupController.pt© UserAutomatedReportsi© WelcomeController.php•Micd eware> M RequestsD Resources_ ResponsesD SerializersC Transformers© Kernel.php© PlaylistTrackResourceTraitT ValidateCrmConnectionRes> D IntegrationslinteractionsM.JobsM Activitv> D AiAutomationAjReportsD AudioD AutomatedReports© RequestGenerateAskJin© RequestGenerateReport© SendReportJob.php© ReportController.php© AutomatedReportsCommand.php© AutomatedReportsService.phpJiminnyDeouecommana.ongAutomatedReportsSendCommand.php© AddLayoutEntities.phpC Team.php© AutomatedReportsRepository.phpCreateHeldActivityEvent.php© TrackProviderInstalledEvent.php© UserPilotActivityListener.php© ActivityLogged.phpC RequestGenerateAskJiminnyReportJob.php x© AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique opublic function handle(1):99101102103104105106107108109110111112113114115116117return;$savedSearch = $automatedReport->getSavedSearch;1t Usaveosearch === nuuu *+Logger->warninglselt..Loo_PkErLX•'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1);lecuri$prompt = $automatedReport->getAskAnythingPromptO);if ($prompt === null) {$logger->warning(self::LOG_PREFIX .' Skipped, ask anything prompt not found',aucomatedkeporcuuld = suhis->reporcuula,1):recurn,$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService: :MEDIA_TYPE_PDF,SactivityIds = $activityService-›getActivityIdsFoJSavedSearch(savedSearch: $savedSearch,user: $creator,):$logger->info(self::LOG_PREFIX • ' Fetched activity IDs', I'automatedReportUuid' = $this->reportUvid,'activityCount' => count($activityIds),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {$this->failReport( reason: AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);$logger->info(self::LOG_PREFIXNot enough activities, skipped', I'automatedReportUuid' = $this->reportUvid,'activityCount' => count(SactivityIds),1);PecurtldWindsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log= laravel.log< console PRODAl console (EU]© AskJiminnyReportActivityService.phpA SF ljiminny@localhost]A HS_local [jiminny@localhost]A console [STAGING] XC RequestGenerateAskJiminnyReportJobTest.phpPlaygroundX:Auto vSajiminnysa.*,016 A13 M13 A V519T.owner 1o rkum social accounus salJulrusers u on uni - sa.soclaote 1olv 521Juir realls t1..n<->1: on t.id = u.team id522523WHERE U.team_id = 1 and sa.provider = 'salesforce':524525select * from teams where id = 1;select * fromgroups g JOIN playbooks p 1.n<->1: on g.playbook_id = p.id wherselect * from groups where id = 565;527528529530select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * fromusers where team_1d = 1;select * TroIusers were 10 =100.15574select * Tr01crm_profiles where user_id = 7160;533select * fromTeacures,534select535536537538539540541542# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_1# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm_configuration_id = 1 and type ='conference"# and crm_provider_id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLURUER Dy 1d desc)select * from activities where id = 54747783; # 00U0400000pCzojMAC543544545546547select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc 1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';548549550SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'evSELECT * FROM crm_field_values WHERE crm_field_id = 4;5515521553select * from crm_layouts cl join playbook_layouts pl1<-›1.n: on cl.id = pl.:Wnere crn contlouracion 1o =1 and oL.olavoook 10 = 15.594557563select x trol reails?SELECT r.* FROM automated_reports rjoin teams t on r.teamid = t.idWHERE r.frequeney = 'daily'and r.status = 1AND t.status ='active'AND (r.expices.at >= now() OR r.expinesat IS NULL):select * from automated_report_results where reRontaid IN (18, 33);566 vselect * tron acmur searches where 10 = 107521seectx Troiactivity_search_filters where activity_search_id = 10932;select * fromselect * fromautomated_report_results where ceRontaid IN (34, 35);500569Support Daily • in 3h 4mARequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:56:29CascadeFixing ReportControlle• Automated Report N• Automated Report L+D..3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)w[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsauconacedkeporcuuld, actlvicycount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportUuid, activityCountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITIES.4b. Error path (exception):[AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService - the requestParams built from the saved search are not logged (only acalvity countRequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate - so if we fail at count check, we never see the payloadIcan add loaaina to expose the apolied filters and the actual activity IDs when the count is low. Want me to addthat?Askino •uestion• What would you like to improve?What would you like to improve?Loo tne aoolee Ters recuestrarams.rrom te saveo searciAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tincludedbolLog filters + activity IDs in AskJiminnyReportActivityServiceOther answer+ <> CodeClaude Sonnet 4.6SkipW Windsur leams99.30uir-o( 4 spaces...
|
NULL
|
8259833682667048397
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEditFV faVsco.js vViewNavigateCodeLara PhpStormFileEditFV faVsco.js vViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProject vD ControllersDJAPID AuthD CustomerApilinternalKOSKSettings• TelephonyD Webhook> D Hubspot> C IntegrationAppSubsc© ActivityProviderCont© Activity Transcription© BaseController.phpCalendarController.p© ReportController.phpSoftphoneWebhookC© AbstractController.pnp• CommentContextInterfa© ConferencesOptlnOutC,© Controller.phpExportController.php© FrontendController.php€ FrontendControllerTrait© GeocodingController.ph© HealthCheckController.fLiveCoachController.ph/(c) Missino eamcontroller.Mobllecontroller.php© NotificationController.pt© NotificationProviderConPlaybackController.phpPlaylistController.php© PusherController.php© SlackController.php© SupportController.php© TeamSetupController.pt© UserAutomatedReportsi© WelcomeController.php•Micd eware> M RequestsD Resources_ ResponsesD SerializersC Transformers© Kernel.php© PlaylistTrackResourceTraitT ValidateCrmConnectionRes> D IntegrationslinteractionsM.JobsM Activitv> D AiAutomationAjReportsD AudioD AutomatedReports© RequestGenerateAskJin© RequestGenerateReport© SendReportJob.php© ReportController.php© AutomatedReportsCommand.php© AutomatedReportsService.phpJiminnyDeouecommana.ongAutomatedReportsSendCommand.php© AddLayoutEntities.phpC Team.php© AutomatedReportsRepository.phpCreateHeldActivityEvent.php© TrackProviderInstalledEvent.php© UserPilotActivityListener.php© ActivityLogged.phpC RequestGenerateAskJiminnyReportJob.php x© AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique opublic function handle(1):99101102103104105106107108109110111112113114115116117return;$savedSearch = $automatedReport->getSavedSearch;1t Usaveosearch === nuuu *+Logger->warninglselt..Loo_PkErLX•'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1);lecuri$prompt = $automatedReport->getAskAnythingPromptO);if ($prompt === null) {$logger->warning(self::LOG_PREFIX .' Skipped, ask anything prompt not found',aucomatedkeporcuuld = suhis->reporcuula,1):recurn,$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService: :MEDIA_TYPE_PDF,SactivityIds = $activityService-›getActivityIdsFoJSavedSearch(savedSearch: $savedSearch,user: $creator,):$logger->info(self::LOG_PREFIX • ' Fetched activity IDs', I'automatedReportUuid' = $this->reportUvid,'activityCount' => count($activityIds),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {$this->failReport( reason: AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);$logger->info(self::LOG_PREFIXNot enough activities, skipped', I'automatedReportUuid' = $this->reportUvid,'activityCount' => count(SactivityIds),1);PecurtldWindsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log= laravel.log< console PRODAl console (EU]© AskJiminnyReportActivityService.phpA SF ljiminny@localhost]A HS_local [jiminny@localhost]A console [STAGING] XC RequestGenerateAskJiminnyReportJobTest.phpPlaygroundX:Auto vSajiminnysa.*,016 A13 M13 A V519T.owner 1o rkum social accounus salJulrusers u on uni - sa.soclaote 1olv 521Juir realls t1..n<->1: on t.id = u.team id522523WHERE U.team_id = 1 and sa.provider = 'salesforce':524525select * from teams where id = 1;select * fromgroups g JOIN playbooks p 1.n<->1: on g.playbook_id = p.id wherselect * from groups where id = 565;527528529530select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * fromusers where team_1d = 1;select * TroIusers were 10 =100.15574select * Tr01crm_profiles where user_id = 7160;533select * fromTeacures,534select535536537538539540541542# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_1# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm_configuration_id = 1 and type ='conference"# and crm_provider_id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLURUER Dy 1d desc)select * from activities where id = 54747783; # 00U0400000pCzojMAC543544545546547select p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc 1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';548549550SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'evSELECT * FROM crm_field_values WHERE crm_field_id = 4;5515521553select * from crm_layouts cl join playbook_layouts pl1<-›1.n: on cl.id = pl.:Wnere crn contlouracion 1o =1 and oL.olavoook 10 = 15.594557563select x trol reails?SELECT r.* FROM automated_reports rjoin teams t on r.teamid = t.idWHERE r.frequeney = 'daily'and r.status = 1AND t.status ='active'AND (r.expices.at >= now() OR r.expinesat IS NULL):select * from automated_report_results where reRontaid IN (18, 33);566 vselect * tron acmur searches where 10 = 107521seectx Troiactivity_search_filters where activity_search_id = 10932;select * fromselect * fromautomated_report_results where ceRontaid IN (34, 35);500569Support Daily • in 3h 4mARequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:56:29CascadeFixing ReportControlle• Automated Report N• Automated Report L+D..3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)w[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsauconacedkeporcuuld, actlvicycount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportUuid, activityCountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITIES.4b. Error path (exception):[AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService - the requestParams built from the saved search are not logged (only acalvity countRequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate - so if we fail at count check, we never see the payloadIcan add loaaina to expose the apolied filters and the actual activity IDs when the count is low. Want me to addthat?Askino •uestion• What would you like to improve?What would you like to improve?Loo tne aoolee Ters recuestrarams.rrom te saveo searciAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tincludedbolLog filters + activity IDs in AskJiminnyReportActivityServiceOther answer+ <> CodeClaude Sonnet 4.6SkipW Windsur leams99.30uir-o( 4 spaces...
|
NULL
|
|
10742
|
212
|
32
|
2026-04-14T08:56:38.855221+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776156998855_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 4 m100% CTue 14 Apr 11:56:38ec2-user@ip-10-30-93-249:~DOCKER• 8812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
4161505934611867568
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 4 m100% CTue 14 Apr 11:56:38ec2-user@ip-10-30-93-249:~DOCKER• 8812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
|
10743
|
213
|
41
|
2026-04-14T08:56:38.894317+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776156998894_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileFditViewNavigateCodelaraveRefactonTool PhpStormFileFditViewNavigateCodelaraveRefactonToolsWindowHelpFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vProject v© DeviceRepository.phpC ElasticActivityRepository.p© EmailMessageRepository.p© GenericAiPromptRepositor© GroupRepository.php(C InboxEmailBatchRepositor)C InboxRepository.pnp© InvitationRepository.php(C) JobRepository.phpC) LanquageRepository.php© MomentRepository.phpNotificationRepository.phpC) ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.phpC PlavlistActivityRepository.p(© PlaylistRepository.png(C PlaylistShareRepository.phC) QuestionRepository.phpC) RoleChangeEventRepositolC RoleRepository.php© SearchRepository.phpC SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.(C) TaskRepository.phoC TeamAiContextRepository.C TeamDomainsRepository.p(©) TeaminsightsRepository.phC) TeamRepository.phpC ThemeRepository.phpC TimezoneRepository.php© TopicRepository.php© TоpicTriggerRepository.ph© TrackRepository.phpC) TranscriptionModelLocaleF© TranscriptionRepository.prC) TranscriptionSummarvRepC UserRepository.php© VocabularyRepository.pnp> _ Rulesv D Services>D Activity>D AReportsAvatarcalendarM ConferenceM Crm>MImport> MInternallv → Kioskv _ AutomatedReports(C) ActivityTypeService.(©) AskJiminnyReportAc(C) AutomatedReportse(C) AutomatedReportsSc) ReportController.onpJiminnyDeouecommana.ongAutomaleakeporssenacommana.ongC AutomatedReportsCommand.phpC AddLayoutEntities.phpC Team.phpC AutomatedReportsRepository.pnp© AutomatedReportsService.phpCreateHeldActivityEvent.phpe) Track?roviderinstalled-vent.onoCrealencuivityLoggeaeventoneC ActivityLogged.phpC AutomatedReportsCallbackService.phpC RequestGenerateAskJiminnyReportJob.php xRequestGeneratekeportJob.ong© AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJ1minnyReportJob 1mplements ShouldQueue, ShouLdBeUnique oMS^8182831100101102103104105106ML0/I1081091110111112113114115116public function handlel1):Tecurtinssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &+Logger->warninglselt..Luo_PkErLX'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1):lecurisprompt = sautomatedReport->getAskAnythingPromptor1T (sprompt === nULU) 1s Logger->warninglselt::Lub_PRErIX •' SKipped, ask anyuhing prompt not round.'aucomatedkeporcuuld = suhis->reporcuuld,recurn,$this->reportResult = SreportService->createReportResult(automatedReport: sautomatedReport,data: L'status' => AutomatedReportresult::STATUS_DEFAULT,"med1a_type => Aucomatedkeporcsservice:.REULA_TYPE_PUr,SactivitvIds = SactivitvService->getActivitvIdsForSavedSearch0savedSearch: $savedSearch,usel. peredtor,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', ['automatedReportuuld' => sthis->reportuuld,activitycount = count(sactivitylas),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {Sthis->failReport@ reason: AutomatedReportResult::REASON_NOT ENOUGH ACTIVTTIES):$Logger->info(self::LOG_PREFIXNot enough activities, skipped', l'automatedReportUuid' => $this->reportUuid,'activityCount" => count(Sactivitylds),1);PecurtldWinasurt changelog 2.12.21: A new version is avallable. |/ View Changelog (today 10:33)= custom.log= laravel.logL SF (iminny@localhost≤ HS_local fiminny@localhost)console PRODL console [EUlconsole SlAGiNG© AsKJiminnyReportActivityService.php xC RequestGenerateAskJiminnyReportJobTest.php2201 AYclass AskJLminnyкeporcActIviLyservice25293132333436L-5%59private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ACu1VItyAccuaLbate::PARAM_END_DAIE,Acu1vityupaacedbace::PARAM_UPDATEU_FRUN,Aculvityupdaceduace:.PARAN_UPDATEU_TU,closingrertoarttter..ner_orAKl_bAlE,Losinorertoortuter.acr eNu DAnspublic function -_construct(private readonly ActivitySearch Sactivitysearchprivate readonly ElasticActivityRepository selasticrepository,private readonly Loggerinterface slogger,) 1...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Cri* Date filters stored on the saved search are excluded; if no other filte* no date constraint is applied - matching the behaviour of getContextFo.* dreturn stringl Activity IDs*/public function getActivityldsForSavedsearchSearch SsavedSearch,User suser,"array1prequestrarans = stns-2outLaked Botraranstromsearchlssaveasearen, suScriteria = Criteria::createFromReauest(array merge(SrequestParams, ['limit' => self::DEFAULT_TOP ACTIVITIsuser->getTimezoneo):sfilterset = sthis->activitysearch->getonbemandPager1lterset(scritersactivitylds = sthis->elast1cRepository->onDemandSearchldsonly(suser$this->logger->info('[AskJiminnyReport] Fetched activity IDs for savecsaveo searchto = osaveosearch->cetlo."user 1o=> Suser->getia).'activity_count' => count($activityIds),I);return Sactivityids:private function bu1ldRequestParamsFromsearch(Search ssavedsearch, User $Support Daily • in 3h 4 m100% |45]Tue 14 Apr 11:56:38RequestGenerateAskJiminnyReportJobTest vCascadeFixing ReportControlle• Automated Report N© Automated Report !3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsautomatedReportUuid, activityCount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportuuid, activitycountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITLES.4b. Error path (exception):AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService-the requestParams built trom the saved search are not logged (only acalvity count2. RequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-156), wnich isafter the activity count gate — so if we fail at count check, we never see the payloadI can add logaina to expose the applied filters and the actual activity IDs when the count is low. Want me to addthatAskino •uestion• What would you like to improve?WWhat would you like to improve?Loo tne aoolee Tters recuestrarams)rrom the saveo searchAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tInc ludedbothLog tilters + activity IDs in AskJiminnyReportActivityServiceother ancwer+ <> CodeClaude Sennet 4.6SkipW Winasunt leams44:2uir-oia 4 spaces...
|
NULL
|
-7553406604276974234
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileFditViewNavigateCodelaraveRefactonTool PhpStormFileFditViewNavigateCodelaraveRefactonToolsWindowHelpFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vProject v© DeviceRepository.phpC ElasticActivityRepository.p© EmailMessageRepository.p© GenericAiPromptRepositor© GroupRepository.php(C InboxEmailBatchRepositor)C InboxRepository.pnp© InvitationRepository.php(C) JobRepository.phpC) LanquageRepository.php© MomentRepository.phpNotificationRepository.phpC) ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.phpC PlavlistActivityRepository.p(© PlaylistRepository.png(C PlaylistShareRepository.phC) QuestionRepository.phpC) RoleChangeEventRepositolC RoleRepository.php© SearchRepository.phpC SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.(C) TaskRepository.phoC TeamAiContextRepository.C TeamDomainsRepository.p(©) TeaminsightsRepository.phC) TeamRepository.phpC ThemeRepository.phpC TimezoneRepository.php© TopicRepository.php© TоpicTriggerRepository.ph© TrackRepository.phpC) TranscriptionModelLocaleF© TranscriptionRepository.prC) TranscriptionSummarvRepC UserRepository.php© VocabularyRepository.pnp> _ Rulesv D Services>D Activity>D AReportsAvatarcalendarM ConferenceM Crm>MImport> MInternallv → Kioskv _ AutomatedReports(C) ActivityTypeService.(©) AskJiminnyReportAc(C) AutomatedReportse(C) AutomatedReportsSc) ReportController.onpJiminnyDeouecommana.ongAutomaleakeporssenacommana.ongC AutomatedReportsCommand.phpC AddLayoutEntities.phpC Team.phpC AutomatedReportsRepository.pnp© AutomatedReportsService.phpCreateHeldActivityEvent.phpe) Track?roviderinstalled-vent.onoCrealencuivityLoggeaeventoneC ActivityLogged.phpC AutomatedReportsCallbackService.phpC RequestGenerateAskJiminnyReportJob.php xRequestGeneratekeportJob.ong© AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJ1minnyReportJob 1mplements ShouldQueue, ShouLdBeUnique oMS^8182831100101102103104105106ML0/I1081091110111112113114115116public function handlel1):Tecurtinssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &+Logger->warninglselt..Luo_PkErLX'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1):lecurisprompt = sautomatedReport->getAskAnythingPromptor1T (sprompt === nULU) 1s Logger->warninglselt::Lub_PRErIX •' SKipped, ask anyuhing prompt not round.'aucomatedkeporcuuld = suhis->reporcuuld,recurn,$this->reportResult = SreportService->createReportResult(automatedReport: sautomatedReport,data: L'status' => AutomatedReportresult::STATUS_DEFAULT,"med1a_type => Aucomatedkeporcsservice:.REULA_TYPE_PUr,SactivitvIds = SactivitvService->getActivitvIdsForSavedSearch0savedSearch: $savedSearch,usel. peredtor,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', ['automatedReportuuld' => sthis->reportuuld,activitycount = count(sactivitylas),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {Sthis->failReport@ reason: AutomatedReportResult::REASON_NOT ENOUGH ACTIVTTIES):$Logger->info(self::LOG_PREFIXNot enough activities, skipped', l'automatedReportUuid' => $this->reportUuid,'activityCount" => count(Sactivitylds),1);PecurtldWinasurt changelog 2.12.21: A new version is avallable. |/ View Changelog (today 10:33)= custom.log= laravel.logL SF (iminny@localhost≤ HS_local fiminny@localhost)console PRODL console [EUlconsole SlAGiNG© AsKJiminnyReportActivityService.php xC RequestGenerateAskJiminnyReportJobTest.php2201 AYclass AskJLminnyкeporcActIviLyservice25293132333436L-5%59private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ACu1VItyAccuaLbate::PARAM_END_DAIE,Acu1vityupaacedbace::PARAM_UPDATEU_FRUN,Aculvityupdaceduace:.PARAN_UPDATEU_TU,closingrertoarttter..ner_orAKl_bAlE,Losinorertoortuter.acr eNu DAnspublic function -_construct(private readonly ActivitySearch Sactivitysearchprivate readonly ElasticActivityRepository selasticrepository,private readonly Loggerinterface slogger,) 1...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Cri* Date filters stored on the saved search are excluded; if no other filte* no date constraint is applied - matching the behaviour of getContextFo.* dreturn stringl Activity IDs*/public function getActivityldsForSavedsearchSearch SsavedSearch,User suser,"array1prequestrarans = stns-2outLaked Botraranstromsearchlssaveasearen, suScriteria = Criteria::createFromReauest(array merge(SrequestParams, ['limit' => self::DEFAULT_TOP ACTIVITIsuser->getTimezoneo):sfilterset = sthis->activitysearch->getonbemandPager1lterset(scritersactivitylds = sthis->elast1cRepository->onDemandSearchldsonly(suser$this->logger->info('[AskJiminnyReport] Fetched activity IDs for savecsaveo searchto = osaveosearch->cetlo."user 1o=> Suser->getia).'activity_count' => count($activityIds),I);return Sactivityids:private function bu1ldRequestParamsFromsearch(Search ssavedsearch, User $Support Daily • in 3h 4 m100% |45]Tue 14 Apr 11:56:38RequestGenerateAskJiminnyReportJobTest vCascadeFixing ReportControlle• Automated Report N© Automated Report !3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsautomatedReportUuid, activityCount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportuuid, activitycountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITLES.4b. Error path (exception):AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService-the requestParams built trom the saved search are not logged (only acalvity count2. RequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-156), wnich isafter the activity count gate — so if we fail at count check, we never see the payloadI can add logaina to expose the applied filters and the actual activity IDs when the count is low. Want me to addthatAskino •uestion• What would you like to improve?WWhat would you like to improve?Loo tne aoolee Tters recuestrarams)rrom the saveo searchAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tInc ludedbothLog tilters + activity IDs in AskJiminnyReportActivityServiceother ancwer+ <> CodeClaude Sennet 4.6SkipW Winasunt leams44:2uir-oia 4 spaces...
|
10741
|
|
10744
|
212
|
33
|
2026-04-14T08:56:40.954514+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157000954_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 4 m100% CTue 14 Apr 11:56:40ec2-user@ip-10-30-93-249:~DOCKER9812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
2156048768355687019
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 4 m100% CTue 14 Apr 11:56:40ec2-user@ip-10-30-93-249:~DOCKER9812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
10742
|
|
10745
|
212
|
34
|
2026-04-14T08:56:42.426003+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157002426_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 4 m100% CTue 14 Apr 11:56:42ec2-user@ip-10-30-93-249:~DOCKER9812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
-6718333335024315132
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 4 m100% CTue 14 Apr 11:56:42ec2-user@ip-10-30-93-249:~DOCKER9812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
|
10746
|
213
|
42
|
2026-04-14T08:56:42.426040+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157002426_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileFditViewNavigateCodelaraveRefactonTool PhpStormFileFditViewNavigateCodelaraveRefactonToolsWindowHelpFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vProject v© DeviceRepository.phpC ElasticActivityRepository.p© EmailMessageRepository.p© GenericAiPromptRepositor© GroupRepository.php(C InboxEmailBatchRepositor)C InboxRepository.pnp© InvitationRepository.php(C) JobRepository.phpC) LanquageRepository.php© MomentRepository.phpNotificationRepository.phpC) ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.phpC PlavlistActivityRepository.p(© PlaylistRepository.png(C PlaylistShareRepository.phC) QuestionRepository.phpC) RoleChangeEventRepositolC RoleRepository.php© SearchRepository.phpC SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.(C) TaskRepository.phoC TeamAiContextRepository.C TeamDomainsRepository.p(©) TeaminsightsRepository.phC) TeamRepository.phpC ThemeRepository.phpC TimezoneRepository.php© TopicRepository.php© TоpicTriggerRepository.ph© TrackRepository.phpC) TranscriptionModelLocaleF© TranscriptionRepository.prC) TranscriptionSummarvRepC UserRepository.php© VocabularyRepository.pnp> _ Rulesv D Services>D Activity>D AReportsAvatarcalendarM ConferenceM Crm>MImport> MInternallv → Kioskv _ AutomatedReports(C) ActivityTypeService.(©) AskJiminnyReportAc(C) AutomatedReportse(C) AutomatedReportsSc) ReportController.onpJiminnyDeouecommana.ongAutomaleakeporssenacommana.ongC AutomatedReportsCommand.phpC AddLayoutEntities.phpC Team.phpC AutomatedReportsRepository.pnp© AutomatedReportsService.phpCreateHeldActivityEvent.phpe) Track?roviderinstalled-vent.onoCrealencuivityLoggeaeventoneC ActivityLogged.phpC AutomatedReportsCallbackService.phpC RequestGenerateAskJiminnyReportJob.php xRequestGeneratekeportJob.ong© AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJ1minnyReportJob 1mplements ShouldQueue, ShouLdBeUnique oMS^8182831100101102103104105106ML0/I1081091110111112113114115116public function handlel1):Tecurtinssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &+Logger->warninglselt..Luo_PkErLX'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1):lecurisprompt = sautomatedReport->getAskAnyth1ngPromptO:1T (sprompt === nULU) 1s Logger->warninglselt::Lub_PRErIX •' SKipped, ask anyuhing prompt not round.'aucomatedkeporcuuld = suhis->reporcuuld,recurn,$this->reportResult = SreportService->createReportResult(automatedReport: sautomatedReport,data: L'status' => AutomatedReportresult::STATUS_DEFAULT,"medla_type => Automacedkeporcsservice:.REULA_TYPE_PUr.SactivitvIds = SactivitvService->getActivitvIdsForSavedSearch0savedSearch: $savedSearch,usel. peredtor,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', ['automatedReportuuld' => sth1s->reportuuld,activitycount = count(sactivitylas),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {Sthis->failReport@ reason: AutomatedReportResult::REASON_NOT ENOUGH ACTIVTTIES):$Logger->info(self::LOG_PREFIXNot enough activities, skipped', l'automatedReportUuid' => $this->reportUuid,'activityCount" => count(Sactivitylds),1);PecurtldWinasurt changelog 2.12.21: A new version is avallable. l View Changelog (today 10:35)= custom.log= laravel.logL SF (iminny@localhost« HS_local fiminny@localhostconsole PRODL console [EUlconsole SlAGiNG© AsKJiminnyReportActivityService.php x© RequestGenerateAskJiminnyReportJobTest.phpX221 ^ vclass AskJLminnyкeporcActIviLyservice25293132333436private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ACu1VItyAccuaLbate::PARAM_END_DAIE,Acu1vityupaacedbace: :PARAM_UPDATEU_FRUN,Aculvityupdaceduace:.PARAN_UPDATEU_TU,closingrertoarttter..ner_orAKl_bAlE,Losinorertoortuter.acr eNu DAnspublic function -_construct(private readonly ActivitySearch Sactivitysearchprivate readonly ElasticActivityRepository selasticrepository,private readonly Loggerinterface slogger,) 1...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Cri* Date filters stored on the saved search are excluded; if no other filte* no date constraint is applied - matching the behaviour of getContextFo.* dreturn stringl Activity IDs*/public function getActivityldsForsavedsearchSearch Ssavedsearch,User suser.Cascade 2 LlCommand 42"array1$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $uScriteria = Criteria::createFromRequest(array_merge($requestParams, L'Limg' => self::DEFAULT_TOP ACTIVITISuser->getTimezoneosfilterset = sthis->activitysearch->getonbemandPager1lterset(scritersactivitylds = sthis->elast1cRepos1tory->onDemandSearchldsonly(susern$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved"saveo search 10'=saveosearch->cer10."user 1o=> Suser->qetIdol'activity_count' => count($activityIds),I);return Sactivityids:private function bu1ldRequestParamsFromsearch(Search ssavedSearch, UserSupport Daily • in 3h 4 m100% |45]Tue 14 Apr 11:56:42RequestGenerateAskJiminnyReportJobTest vCascadeFixing ReportControlle• Automated Report N© Automated Report !3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsautomatedReportUuid, activityCount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportuuid, activitycountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITLES.4b. Error path (exception):AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService-the requestParams built trom the saved search are not logged (only acalvity count2. RequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-156), wnich isafter the activity count gate — so if we fail at count check, we never see the payloadI can add logaina to expose the applied filters and the actual activity IDs when the count is low. Want me to addthatAskino •uestion• What would you like to improve?WWhat would you like to improve?Loo tne aoolee Tters recuestrarams)rrom the saveo searchAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tInc ludedbolLog tilters + activity IDs in AskJiminnyReportActivityServiceother ancwer+ <> CodeClaude Sennet 4.6Skipwinasun leams40:19 s charsuir-oia 4 spaces...
|
NULL
|
-5452704561530700327
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileFditViewNavigateCodelaraveRefactonTool PhpStormFileFditViewNavigateCodelaraveRefactonToolsWindowHelpFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vProject v© DeviceRepository.phpC ElasticActivityRepository.p© EmailMessageRepository.p© GenericAiPromptRepositor© GroupRepository.php(C InboxEmailBatchRepositor)C InboxRepository.pnp© InvitationRepository.php(C) JobRepository.phpC) LanquageRepository.php© MomentRepository.phpNotificationRepository.phpC) ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.phpC PlavlistActivityRepository.p(© PlaylistRepository.png(C PlaylistShareRepository.phC) QuestionRepository.phpC) RoleChangeEventRepositolC RoleRepository.php© SearchRepository.phpC SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.(C) TaskRepository.phoC TeamAiContextRepository.C TeamDomainsRepository.p(©) TeaminsightsRepository.phC) TeamRepository.phpC ThemeRepository.phpC TimezoneRepository.php© TopicRepository.php© TоpicTriggerRepository.ph© TrackRepository.phpC) TranscriptionModelLocaleF© TranscriptionRepository.prC) TranscriptionSummarvRepC UserRepository.php© VocabularyRepository.pnp> _ Rulesv D Services>D Activity>D AReportsAvatarcalendarM ConferenceM Crm>MImport> MInternallv → Kioskv _ AutomatedReports(C) ActivityTypeService.(©) AskJiminnyReportAc(C) AutomatedReportse(C) AutomatedReportsSc) ReportController.onpJiminnyDeouecommana.ongAutomaleakeporssenacommana.ongC AutomatedReportsCommand.phpC AddLayoutEntities.phpC Team.phpC AutomatedReportsRepository.pnp© AutomatedReportsService.phpCreateHeldActivityEvent.phpe) Track?roviderinstalled-vent.onoCrealencuivityLoggeaeventoneC ActivityLogged.phpC AutomatedReportsCallbackService.phpC RequestGenerateAskJiminnyReportJob.php xRequestGeneratekeportJob.ong© AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJ1minnyReportJob 1mplements ShouldQueue, ShouLdBeUnique oMS^8182831100101102103104105106ML0/I1081091110111112113114115116public function handlel1):Tecurtinssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &+Logger->warninglselt..Luo_PkErLX'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1):lecurisprompt = sautomatedReport->getAskAnyth1ngPromptO:1T (sprompt === nULU) 1s Logger->warninglselt::Lub_PRErIX •' SKipped, ask anyuhing prompt not round.'aucomatedkeporcuuld = suhis->reporcuuld,recurn,$this->reportResult = SreportService->createReportResult(automatedReport: sautomatedReport,data: L'status' => AutomatedReportresult::STATUS_DEFAULT,"medla_type => Automacedkeporcsservice:.REULA_TYPE_PUr.SactivitvIds = SactivitvService->getActivitvIdsForSavedSearch0savedSearch: $savedSearch,usel. peredtor,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', ['automatedReportuuld' => sth1s->reportuuld,activitycount = count(sactivitylas),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {Sthis->failReport@ reason: AutomatedReportResult::REASON_NOT ENOUGH ACTIVTTIES):$Logger->info(self::LOG_PREFIXNot enough activities, skipped', l'automatedReportUuid' => $this->reportUuid,'activityCount" => count(Sactivitylds),1);PecurtldWinasurt changelog 2.12.21: A new version is avallable. l View Changelog (today 10:35)= custom.log= laravel.logL SF (iminny@localhost« HS_local fiminny@localhostconsole PRODL console [EUlconsole SlAGiNG© AsKJiminnyReportActivityService.php x© RequestGenerateAskJiminnyReportJobTest.phpX221 ^ vclass AskJLminnyкeporcActIviLyservice25293132333436private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ACu1VItyAccuaLbate::PARAM_END_DAIE,Acu1vityupaacedbace: :PARAM_UPDATEU_FRUN,Aculvityupdaceduace:.PARAN_UPDATEU_TU,closingrertoarttter..ner_orAKl_bAlE,Losinorertoortuter.acr eNu DAnspublic function -_construct(private readonly ActivitySearch Sactivitysearchprivate readonly ElasticActivityRepository selasticrepository,private readonly Loggerinterface slogger,) 1...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Cri* Date filters stored on the saved search are excluded; if no other filte* no date constraint is applied - matching the behaviour of getContextFo.* dreturn stringl Activity IDs*/public function getActivityldsForsavedsearchSearch Ssavedsearch,User suser.Cascade 2 LlCommand 42"array1$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $uScriteria = Criteria::createFromRequest(array_merge($requestParams, L'Limg' => self::DEFAULT_TOP ACTIVITISuser->getTimezoneosfilterset = sthis->activitysearch->getonbemandPager1lterset(scritersactivitylds = sthis->elast1cRepos1tory->onDemandSearchldsonly(susern$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved"saveo search 10'=saveosearch->cer10."user 1o=> Suser->qetIdol'activity_count' => count($activityIds),I);return Sactivityids:private function bu1ldRequestParamsFromsearch(Search ssavedSearch, UserSupport Daily • in 3h 4 m100% |45]Tue 14 Apr 11:56:42RequestGenerateAskJiminnyReportJobTest vCascadeFixing ReportControlle• Automated Report N© Automated Report !3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsautomatedReportUuid, activityCount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportuuid, activitycountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITLES.4b. Error path (exception):AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService-the requestParams built trom the saved search are not logged (only acalvity count2. RequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-156), wnich isafter the activity count gate — so if we fail at count check, we never see the payloadI can add logaina to expose the applied filters and the actual activity IDs when the count is low. Want me to addthatAskino •uestion• What would you like to improve?WWhat would you like to improve?Loo tne aoolee Tters recuestrarams)rrom the saveo searchAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tInc ludedbolLog tilters + activity IDs in AskJiminnyReportActivityServiceother ancwer+ <> CodeClaude Sennet 4.6Skipwinasun leams40:19 s charsuir-oia 4 spaces...
|
NULL
|
|
10747
|
212
|
35
|
2026-04-14T08:56:48.864410+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157008864_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 4 m100% CTue 14 Apr 11:56:48ec2-user@ip-10-30-93-249:~DOCKER• 8812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
-4747806133521070961
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 4 m100% CTue 14 Apr 11:56:48ec2-user@ip-10-30-93-249:~DOCKER• 8812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
10745
|
|
10748
|
213
|
43
|
2026-04-14T08:56:48.842083+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157008842_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileFditViewNavigateCodelaraveRefactonTool PhpStormFileFditViewNavigateCodelaraveRefactonToolsWindowHelpFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vProject v© DeviceRepository.phpC ElasticActivityRepository.p© EmailMessageRepository.p© GenericAiPromptRepositor© GroupRepository.php(C InboxEmailBatchRepositor)C InboxRepository.pnp© InvitationRepository.php(C) JobRepository.phpC) LanquageRepository.php© MomentRepository.phpNotificationRepository.phpC) ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.phpC PlavlistActivityRepository.p(© PlaylistRepository.png(C PlaylistShareRepository.phC) QuestionRepository.phpC) RoleChangeEventRepositolC RoleRepository.php© SearchRepository.phpC SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.(C) TaskRepository.phoC TeamAiContextRepository.C TeamDomainsRepository.p(©) TeaminsightsRepository.phC) TeamRepository.phpC ThemeRepository.phpC TimezoneRepository.php© TopicRepository.php© TоpicTriggerRepository.ph© TrackRepository.phpC) TranscriptionModelLocaleF© TranscriptionRepository.prC) TranscriptionSummarvRepC UserRepository.php© VocabularyRepository.pnp> _ Rulesv D Services>D Activity>D AReportsAvatarcalendarM ConferenceM Crm>MImport> MInternallv → Kioskv _ AutomatedReports(C) ActivityTypeService.(©) AskJiminnyReportAc(C) AutomatedReportse(C) AutomatedReportsSc) ReportController.onpJiminnyDeouecommana.ongAutomaleakeporssenacommana.ongC AutomatedReportsCommand.phpC AddLayoutEntities.phpC Team.phpC AutomatedReportsRepository.pnp© AutomatedReportsService.phpCreateHeldActivityEvent.phpe) Track?roviderinstalled-vent.onoCrealenctivityLoggeaevent.oneC ActivityLogged.phpC AutomatedReportsCallbackService.phpC RequestGenerateAskJiminnyReportJob.php xRequestGeneratekeporJob.ong© AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJ1minnyReportJob 1mplements ShouldQueue, ShouLdBeUnique oMS^8182831100101102103104105106ML0/I1081091110111112113114115116public function handlel1):Tecurtinssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &+Logger->warninglselt..Luo_PkErLX'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1):lecurisprompt = sautomatedReport->getAskAnythingPromptor1T (sprompt === nULU) 1s Logger->warninglselt::Lub_PRErIX •' SKipped, ask anyuhing prompt not round.'aucomatedkeporcuuld = suhis->reporcuuld,recurn,$this->reportResult = SreportService->createReportResult(automatedReport: sautomatedReport,data: L'status' => AutomatedReportresult::STATUS_DEFAULT,"med1a_type => Aucomatedkeporcsservice:.REULA_TYPE_PUr,SactivitvIds = SactivitvService->getActivitvIdsForSavedSearch0savedSearch: $savedSearch,usel. peredtor,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', ['automatedReportuuld' => sthis->reportuuld,activitycount = count(sactivitylas),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {Sthis->failReport reason: AutomatedReportResult::REASON_ NOT ENOUGH ACTIVITIES):$Logger->info(self::LOG_PREFIXNot enough activities, skipped', l'automatedReportUuid' => $this->reportUuid,'activityCount" => count(Sactivitylds),1);PecurtldWinasurt changelog 2.12.21: A new version is avallable. |/ View Changelog (today 10:33)= custom.log= laravel.logL SF (iminny@localhost« HS_local fiminny@localhostconsole PROD< console LUiconsole SlAGiNG© AsKJiminnyReportActivityService.phpx© RequestGenerateAskJiminnyReportJobTest.phpX201 A Yclass AskJLminnyкeporcActIviLyservice252932333436private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ACu1VItyAccuaLbate::PARAM_END_DAIE,Acu1vityupaacedbace::PARAM_UPDATEU_FRUN,Aculvityupdaceduace:.PARAN_UPDATEU_TU,closingrertoarttter..ner_oraKi_bAlE,Losinorertoortuter.acr eNu DAnspublic function -_construct(private readonly ActivitySearch Sactivitysearchprivate readonly ElasticActivityRepository selasticrepository,private readonly Loggerinterface slogger,) 1...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Cri* Date filters stored on the saved search are excluded; if no other filte* no date constraint is applied - matching the behaviour of getContextFor* dreturn stringl Activity IDs*/public function getActivityldsForsavedsearchSearch Ssavedsearch,User suser,"array1фrequescrarams = suhis->du1lakequescraramstromsearcnssavedsearch, susScriteria = Criteria::createFromReauest(array merge(SrequestParams, ['limit' => self::DEFAULT_TOP ACTIVITIsuser->getTimezoneosfilterset = sthis->activitysearch->getonbemandPager1lterset(scr1terasactivitylds = sthis->elast1cRepository->onDemandSearchldsonly(suser$this->logger->info('[AskJiminnyReport] Fetched activity IDs for savec"saveo search 10'=saveosearch->cer10."user Ton=> Suser->getia).'activity_count' => count($activityIds),I);return Sactivityids:private function bu1ldRequestParamsFromsearch(Search ssavedsearch, User $uSupport Daily • in 3h 4 m100% |45]Tue 14 Apr 11:56:48RequestGenerateAskJiminnyReportJobTest vCascadeFixing ReportControlle• Automated Report N© Automated Report !3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)CascadeWi[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsautomatedReportUuid, activityCount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportuuid, activitycountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITLES.4b. Error path (exception):AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService-the requestParams built trom the saved search are not logged (only acalvity count2. RequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate — so if we fail at count check, we never see the payloadI can add logaina to expose the applied filters and the actual activity IDs when the count is low. Want me to addthatAskino •uestion• What would you like to improve?What would you like to improve?Loo ne aoolee Ters recuestrarams. rrom the saveo searctAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tInc ludedbolLog tilters + activity IDs in AskJiminnyReportActivityServiceother ancwer+ <> CodeClaude Sennet 4.6Skipwinasun leams50:41uir-oia 4 spaces...
|
NULL
|
8187054448026586340
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileFditViewNavigateCodelaraveRefactonTool PhpStormFileFditViewNavigateCodelaraveRefactonToolsWindowHelpFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vProject v© DeviceRepository.phpC ElasticActivityRepository.p© EmailMessageRepository.p© GenericAiPromptRepositor© GroupRepository.php(C InboxEmailBatchRepositor)C InboxRepository.pnp© InvitationRepository.php(C) JobRepository.phpC) LanquageRepository.php© MomentRepository.phpNotificationRepository.phpC) ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.phpC PlavlistActivityRepository.p(© PlaylistRepository.png(C PlaylistShareRepository.phC) QuestionRepository.phpC) RoleChangeEventRepositolC RoleRepository.php© SearchRepository.phpC SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.(C) TaskRepository.phoC TeamAiContextRepository.C TeamDomainsRepository.p(©) TeaminsightsRepository.phC) TeamRepository.phpC ThemeRepository.phpC TimezoneRepository.php© TopicRepository.php© TоpicTriggerRepository.ph© TrackRepository.phpC) TranscriptionModelLocaleF© TranscriptionRepository.prC) TranscriptionSummarvRepC UserRepository.php© VocabularyRepository.pnp> _ Rulesv D Services>D Activity>D AReportsAvatarcalendarM ConferenceM Crm>MImport> MInternallv → Kioskv _ AutomatedReports(C) ActivityTypeService.(©) AskJiminnyReportAc(C) AutomatedReportse(C) AutomatedReportsSc) ReportController.onpJiminnyDeouecommana.ongAutomaleakeporssenacommana.ongC AutomatedReportsCommand.phpC AddLayoutEntities.phpC Team.phpC AutomatedReportsRepository.pnp© AutomatedReportsService.phpCreateHeldActivityEvent.phpe) Track?roviderinstalled-vent.onoCrealenctivityLoggeaevent.oneC ActivityLogged.phpC AutomatedReportsCallbackService.phpC RequestGenerateAskJiminnyReportJob.php xRequestGeneratekeporJob.ong© AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJ1minnyReportJob 1mplements ShouldQueue, ShouLdBeUnique oMS^8182831100101102103104105106ML0/I1081091110111112113114115116public function handlel1):Tecurtinssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &+Logger->warninglselt..Luo_PkErLX'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1):lecurisprompt = sautomatedReport->getAskAnythingPromptor1T (sprompt === nULU) 1s Logger->warninglselt::Lub_PRErIX •' SKipped, ask anyuhing prompt not round.'aucomatedkeporcuuld = suhis->reporcuuld,recurn,$this->reportResult = SreportService->createReportResult(automatedReport: sautomatedReport,data: L'status' => AutomatedReportresult::STATUS_DEFAULT,"med1a_type => Aucomatedkeporcsservice:.REULA_TYPE_PUr,SactivitvIds = SactivitvService->getActivitvIdsForSavedSearch0savedSearch: $savedSearch,usel. peredtor,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', ['automatedReportuuld' => sthis->reportuuld,activitycount = count(sactivitylas),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {Sthis->failReport reason: AutomatedReportResult::REASON_ NOT ENOUGH ACTIVITIES):$Logger->info(self::LOG_PREFIXNot enough activities, skipped', l'automatedReportUuid' => $this->reportUuid,'activityCount" => count(Sactivitylds),1);PecurtldWinasurt changelog 2.12.21: A new version is avallable. |/ View Changelog (today 10:33)= custom.log= laravel.logL SF (iminny@localhost« HS_local fiminny@localhostconsole PROD< console LUiconsole SlAGiNG© AsKJiminnyReportActivityService.phpx© RequestGenerateAskJiminnyReportJobTest.phpX201 A Yclass AskJLminnyкeporcActIviLyservice252932333436private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ACu1VItyAccuaLbate::PARAM_END_DAIE,Acu1vityupaacedbace::PARAM_UPDATEU_FRUN,Aculvityupdaceduace:.PARAN_UPDATEU_TU,closingrertoarttter..ner_oraKi_bAlE,Losinorertoortuter.acr eNu DAnspublic function -_construct(private readonly ActivitySearch Sactivitysearchprivate readonly ElasticActivityRepository selasticrepository,private readonly Loggerinterface slogger,) 1...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Cri* Date filters stored on the saved search are excluded; if no other filte* no date constraint is applied - matching the behaviour of getContextFor* dreturn stringl Activity IDs*/public function getActivityldsForsavedsearchSearch Ssavedsearch,User suser,"array1фrequescrarams = suhis->du1lakequescraramstromsearcnssavedsearch, susScriteria = Criteria::createFromReauest(array merge(SrequestParams, ['limit' => self::DEFAULT_TOP ACTIVITIsuser->getTimezoneosfilterset = sthis->activitysearch->getonbemandPager1lterset(scr1terasactivitylds = sthis->elast1cRepository->onDemandSearchldsonly(suser$this->logger->info('[AskJiminnyReport] Fetched activity IDs for savec"saveo search 10'=saveosearch->cer10."user Ton=> Suser->getia).'activity_count' => count($activityIds),I);return Sactivityids:private function bu1ldRequestParamsFromsearch(Search ssavedsearch, User $uSupport Daily • in 3h 4 m100% |45]Tue 14 Apr 11:56:48RequestGenerateAskJiminnyReportJobTest vCascadeFixing ReportControlle• Automated Report N© Automated Report !3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)CascadeWi[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsautomatedReportUuid, activityCount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportuuid, activitycountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITLES.4b. Error path (exception):AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService-the requestParams built trom the saved search are not logged (only acalvity count2. RequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate — so if we fail at count check, we never see the payloadI can add logaina to expose the applied filters and the actual activity IDs when the count is low. Want me to addthatAskino •uestion• What would you like to improve?What would you like to improve?Loo ne aoolee Ters recuestrarams. rrom the saveo searctAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tInc ludedbolLog tilters + activity IDs in AskJiminnyReportActivityServiceother ancwer+ <> CodeClaude Sennet 4.6Skipwinasun leams50:41uir-oia 4 spaces...
|
10746
|
|
10749
|
212
|
36
|
2026-04-14T08:56:51.854682+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157011854_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 4 m100% CTue 14 Apr 11:56:51ec2-user@ip-10-30-93-249:~DOCKER9812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453eбc4054", "teamId" :1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id" :"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"})root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
4605806789478309178
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 4 m100% CTue 14 Apr 11:56:51ec2-user@ip-10-30-93-249:~DOCKER9812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453eбc4054", "teamId" :1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id" :"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"})root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
|
10750
|
213
|
44
|
2026-04-14T08:56:51.997237+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157011997_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorFV PhpStormFileEditViewNavigateCodeLaravelRefactorFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php© InboxEmailBatchRepositoryInboxRepository.php© InvitationRepository.php©JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositol© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.phpC) TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> D AjReportsD AvatarD CalendarD ConferenceD Crm[ Import> MInternalv D Kioskv D AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.phpC AutomatedReportsRepository.php© JiminnyDebugCommand.phpAutomatedReportsService.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsSendCommand.phpCreateHeldActivityEvent.php© AutomatedReportsCallbackService.php© AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUniquepublic function handle(1):AutomatedReportsCommand.php© TrackProviderInstalledEvent.php© RequestGenerateAskJiminnyReportJob.php© AddLayoutEntities.php© Team.phpCreateActivityLoggedEvent.php© RequestGenerateReportJob.php9092939598100102103104105106107108109110111114115116117118119lecuri$savedSearch = $automatedReport->getSavedSearch();if ($savedSearch === null) {$Logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', ['automatedReportUuid' = $this->reportUvid,]):rerurnr$prompt = $automatedReport->getAskAnythingPromptO);if ($prompt === null) {$logger->warning(self::LOG_PREFIXSkipped, ask anything prompt not found', I'automatedReportUuid' => $this->reportUvid,1):return;$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport.data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,):Sactivityids = $activityService->getActivigy[dsForSavedSearch (savedSearch: $savedSearch,user: +creacor,):$logger->info(self::LOG_PREFIX .' Fetched activity IDs', I'automatedReportUvid' = $this->reportUvid,'activityCount' => count($activityIds),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {$this->failReport( reason: AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);"Loccer-sntoselt..Lug Prorix.'Not enough activities, skipped', Iutolareoreoortuula > suns->redortuuror'activityCount' => count($activityIds),1):lecuri$payLoad = $reportService->getAskJiminnyGenerateReportPayLoad(autonaredredort: vauronaredkedort.Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)M3A20383941Support Daily • in 3h 4mARequestGenerateAsk.JiminnvRenort.lobTest100% C•= custom.logd console [STAGING]= laravel.logA SF [jiminny@localhost]© AskJiminnyReportActivityService.php >A HS_local [iminny@localhost]A console [PROD]© RequestGenerateAskJiminnyReportJobTest.phpAl console [EU]class AskJiminnyReportActivityServiceprivate const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ACENTVACTUd LUATC.APAKAN ONU DAUEActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter: :KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function __construct(private readonly ActivitySearch $activitySearch,private readonly ElasticActivityRepository $elasticRepository,private readonly Loggerintertace logger,) 4...3* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* @return string[] Activity IDs*/public function getActivityIdsForSavedSearch(Search $savedSearch,User $user,): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria::createFromRequest(array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT,'page' => 1]),$user->getTimezone()):$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);$activityIds = $this-›elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AskLimionxReport] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getId(),'user_id'=> $user->getId(),'activity_count' => count($activityIds),1):return $activityIds;privace tunccion bulLakequestrarams-romsearch(search +savedsearch, user suser: array...Tue 14 Apr 11:56:51X201 A Vwinasun leam50:41uir-o( 4 spaces...
|
NULL
|
8850717619163866727
|
NULL
|
visual_change
|
ocr
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorFV PhpStormFileEditViewNavigateCodeLaravelRefactorFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php© InboxEmailBatchRepositoryInboxRepository.php© InvitationRepository.php©JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositol© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.phpC) TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> D AjReportsD AvatarD CalendarD ConferenceD Crm[ Import> MInternalv D Kioskv D AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.phpC AutomatedReportsRepository.php© JiminnyDebugCommand.phpAutomatedReportsService.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsSendCommand.phpCreateHeldActivityEvent.php© AutomatedReportsCallbackService.php© AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUniquepublic function handle(1):AutomatedReportsCommand.php© TrackProviderInstalledEvent.php© RequestGenerateAskJiminnyReportJob.php© AddLayoutEntities.php© Team.phpCreateActivityLoggedEvent.php© RequestGenerateReportJob.php9092939598100102103104105106107108109110111114115116117118119lecuri$savedSearch = $automatedReport->getSavedSearch();if ($savedSearch === null) {$Logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', ['automatedReportUuid' = $this->reportUvid,]):rerurnr$prompt = $automatedReport->getAskAnythingPromptO);if ($prompt === null) {$logger->warning(self::LOG_PREFIXSkipped, ask anything prompt not found', I'automatedReportUuid' => $this->reportUvid,1):return;$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport.data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,):Sactivityids = $activityService->getActivigy[dsForSavedSearch (savedSearch: $savedSearch,user: +creacor,):$logger->info(self::LOG_PREFIX .' Fetched activity IDs', I'automatedReportUvid' = $this->reportUvid,'activityCount' => count($activityIds),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {$this->failReport( reason: AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);"Loccer-sntoselt..Lug Prorix.'Not enough activities, skipped', Iutolareoreoortuula > suns->redortuuror'activityCount' => count($activityIds),1):lecuri$payLoad = $reportService->getAskJiminnyGenerateReportPayLoad(autonaredredort: vauronaredkedort.Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)M3A20383941Support Daily • in 3h 4mARequestGenerateAsk.JiminnvRenort.lobTest100% C•= custom.logd console [STAGING]= laravel.logA SF [jiminny@localhost]© AskJiminnyReportActivityService.php >A HS_local [iminny@localhost]A console [PROD]© RequestGenerateAskJiminnyReportJobTest.phpAl console [EU]class AskJiminnyReportActivityServiceprivate const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ACENTVACTUd LUATC.APAKAN ONU DAUEActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter: :KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function __construct(private readonly ActivitySearch $activitySearch,private readonly ElasticActivityRepository $elasticRepository,private readonly Loggerintertace logger,) 4...3* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* @return string[] Activity IDs*/public function getActivityIdsForSavedSearch(Search $savedSearch,User $user,): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria::createFromRequest(array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT,'page' => 1]),$user->getTimezone()):$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);$activityIds = $this-›elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AskLimionxReport] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getId(),'user_id'=> $user->getId(),'activity_count' => count($activityIds),1):return $activityIds;privace tunccion bulLakequestrarams-romsearch(search +savedsearch, user suser: array...Tue 14 Apr 11:56:51X201 A Vwinasun leam50:41uir-o( 4 spaces...
|
NULL
|
|
10751
|
212
|
37
|
2026-04-14T08:56:54.428225+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157014428_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 4 m100% CTue 14 Apr 11:56:54ec2-user@ip-10-30-93-249:~DOCKER9812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
590566553217257884
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 4 m100% CTue 14 Apr 11:56:54ec2-user@ip-10-30-93-249:~DOCKER9812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
10749
|
|
10752
|
212
|
38
|
2026-04-14T08:56:56.485076+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157016485_m1.jpg...
|
PhpStorm
|
faVsco.js – RequestGenerateAskJiminnyReportJob.php
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
8919510231429811287
|
-5390502313261315096
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error...
|
NULL
|
|
10753
|
213
|
45
|
2026-04-14T08:56:56.483878+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157016483_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileFditViewNavigateCodeLaravelRetactonToo PhpStormFileFditViewNavigateCodeLaravelRetactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProject vAudio• → AutomatedReportsC RequestGenerateAskJir(C) RequestGenerateRepori(©) SendReportJob.php© SendReportMailJob.php> M Calendar• Uerm> MDealRisks› MMailbox› M MeetinaBotMiddleware→ StreamingTeam>W TelephonyJ UserC BaseProcessingJob.php© DummyJob.php© ImportRecallAlRecordingsJ© ImportRemoteTrackJob.phC Job.ohnC) JobDispatcher.pho© JobDispatcherInterface.phC) PurgeSoftDeletedOpporturT SqsVisibilityControl.php> D Listeners› D Mailv _ Models>@ Activity• MAi> CJ AskAnything> M Calendar> M Connection> M ContractsCrm› ElasticSearch→ Feature› _ opportunity_ Participant_ PlaybackThemePlaylistMScorecard>MWebhookC) Account.oho© Activity.phpC Address.php(C) AiPrompt.php(C) AutomatedReport.php© AutomatedReportResult.ph(C) Calendar.phpc) Callimport.php© CoachingFeedback.php© CoachingFeedbackVisibilit© CoachingSection.phpC) CoachinaSectionCriterion.rC) CoachinaSectionCriterionFC CoachingSectionFeedback© CommentAbstract.pngD Commentinterface.php(©) ReportController.phpJiminnybeouecommana.ongcAutomatedRenorissenccommana.ongC AutomatedReportsCommand.phpC AddLayoutEntities.phpC Team.phpC AutomatedReportsRepository.pnp© AutomatedReportsService.php© CreateHeldActivityEvent.phpe) Track?rovidernstalled-vent.ono© CreateActivityLoggedevent.php(©) UserPilotActivityListener.php©) ActivityLogged.phpC) AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.phpRequestGeneratekeporJob.onoC AutomatedReportResult.php(e) AutomatedRenort.ohn.class RequestGenerateAskJ1minnyReportJob 1mplements ShouldQueue, ShouldBeUnique100101102103104105106ML0/I1081091110111112113114115116public function handlel1):return;"savedsearch = vauronareckedort-eravedsearchloIt (osavedsearch === nulb) 1"Loodere>varnno, seut.aLud racrie.'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1);lecurisprompt = sautomatedReport->getAskAnythingPromptor1T (sprompt === nULU) 1s Logger->warningtselt::LU6_PREFLX•'Skipped, ask anything prompt not found', [aucomatedkeporcuuld = suhis->reporcuula,recurn,$this->reportResult = SreportService->createReportResult(automatedReport: sautomatedReport,data: L'status' => AutomatedReportresult::STATUS_DEFAULT,"med1a_type => Aucomatedkeporcsservice:.REULA_TYPE_PUr,SactivitvIds = SactivitvService->getActivitvIdsForSavedSearch0savedSearch: $savedSearch,usel. scl ealot):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', ['automatedReportuuld' => sthis->reportuuld,activitycount = count(sactivitylas),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {Sthis->failReport@ reason: AutomatedReportResult::REASON_NOT ENOUGH ACTIVTTIES):SLoqger->info(self::LOG_PREFIX .Not enough activities, skipped'. l'automatedReportUuid' => $this->reportUuid,'activityCount" => count(Sactivitylds),1);PecurtldWinasurt changelog 2.12.21: A new version is avallable. # View Changelog (today 10:33,libdSupport Daily • in 3h 4 m100% [2Tue 14 Apr 11:56:56• RequestGenerateAskJiminnyReportJobTest v= custom.log= laravel.loge SF (iminny@localhostc HS_local fiminny@localhost)& console (PROD]& console (EU]L console (STAGINGC AskJiminnyReportActivityService.phpRequestGenerateaskyiminnykeportJoblest.pnpV2 21 лclass ASkJ1minnyReportActiv1tyservice39--5061626364private const 1nt DEFAULI_/UP_ACIIVLILES_COUNl = 100;private const array [ENV_SECRET] START DATE.ActivitvActualDate::PARAM END DATE.ActivityUpdatedDate::PARAM_UPDATED_FROMActivityUpdatedDate::PARAM_UPDATED_ TO,ClosingPeriodFilter::KEY_START DATE.ClosingPer1odr1lter::KEY_END_DATE,pubLic tunction -_constructprivate readonly Aculvicysearch sacuivitysearch,private readonly ElasticActivitykeposicory selasclckepository.orvare reaconuy Loocerinuertace "Lodder• 4...3* Fetch activity IDs for a saved search, passing its filters as-is to Criteria* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint 1s applied - matching the behaviour of getcontextrorAskAnythingßyrilter.* @return string[] Activity IDs*/pubuic tunccion getAculvitylasrorsavedsearcncsearch ssaveosearch.iuser nuser.0: array 4SrequestParams = Sthis->buildRequestParamsFromSearchSsavedSearch, Suser):Scriteria = Criteria::createFromRequestarray_merge($requestParams, L'Limit' => seLf::DEFAULT_TOP_ACTIVITTES_COUNT, 'page' => 1J),suser->getlimezoneptilterser = suhls-›aculvitysearch-›gecunbemandrageriltersec(scriterla, suser))$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getido,'user id'=> Suser->getido'activity_count' => count($activitylds),1):return sactivitvids.private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array(...}w Windsur leams98.buir-oia 4 spaces...
|
NULL
|
-3121413559751215336
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileFditViewNavigateCodeLaravelRetactonToo PhpStormFileFditViewNavigateCodeLaravelRetactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-iminny K vProject vAudio• → AutomatedReportsC RequestGenerateAskJir(C) RequestGenerateRepori(©) SendReportJob.php© SendReportMailJob.php> M Calendar• Uerm> MDealRisks› MMailbox› M MeetinaBotMiddleware→ StreamingTeam>W TelephonyJ UserC BaseProcessingJob.php© DummyJob.php© ImportRecallAlRecordingsJ© ImportRemoteTrackJob.phC Job.ohnC) JobDispatcher.pho© JobDispatcherInterface.phC) PurgeSoftDeletedOpporturT SqsVisibilityControl.php> D Listeners› D Mailv _ Models>@ Activity• MAi> CJ AskAnything> M Calendar> M Connection> M ContractsCrm› ElasticSearch→ Feature› _ opportunity_ Participant_ PlaybackThemePlaylistMScorecard>MWebhookC) Account.oho© Activity.phpC Address.php(C) AiPrompt.php(C) AutomatedReport.php© AutomatedReportResult.ph(C) Calendar.phpc) Callimport.php© CoachingFeedback.php© CoachingFeedbackVisibilit© CoachingSection.phpC) CoachinaSectionCriterion.rC) CoachinaSectionCriterionFC CoachingSectionFeedback© CommentAbstract.pngD Commentinterface.php(©) ReportController.phpJiminnybeouecommana.ongcAutomatedRenorissenccommana.ongC AutomatedReportsCommand.phpC AddLayoutEntities.phpC Team.phpC AutomatedReportsRepository.pnp© AutomatedReportsService.php© CreateHeldActivityEvent.phpe) Track?rovidernstalled-vent.ono© CreateActivityLoggedevent.php(©) UserPilotActivityListener.php©) ActivityLogged.phpC) AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.phpRequestGeneratekeporJob.onoC AutomatedReportResult.php(e) AutomatedRenort.ohn.class RequestGenerateAskJ1minnyReportJob 1mplements ShouldQueue, ShouldBeUnique100101102103104105106ML0/I1081091110111112113114115116public function handlel1):return;"savedsearch = vauronareckedort-eravedsearchloIt (osavedsearch === nulb) 1"Loodere>varnno, seut.aLud racrie.'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1);lecurisprompt = sautomatedReport->getAskAnythingPromptor1T (sprompt === nULU) 1s Logger->warningtselt::LU6_PREFLX•'Skipped, ask anything prompt not found', [aucomatedkeporcuuld = suhis->reporcuula,recurn,$this->reportResult = SreportService->createReportResult(automatedReport: sautomatedReport,data: L'status' => AutomatedReportresult::STATUS_DEFAULT,"med1a_type => Aucomatedkeporcsservice:.REULA_TYPE_PUr,SactivitvIds = SactivitvService->getActivitvIdsForSavedSearch0savedSearch: $savedSearch,usel. scl ealot):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', ['automatedReportuuld' => sthis->reportuuld,activitycount = count(sactivitylas),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {Sthis->failReport@ reason: AutomatedReportResult::REASON_NOT ENOUGH ACTIVTTIES):SLoqger->info(self::LOG_PREFIX .Not enough activities, skipped'. l'automatedReportUuid' => $this->reportUuid,'activityCount" => count(Sactivitylds),1);PecurtldWinasurt changelog 2.12.21: A new version is avallable. # View Changelog (today 10:33,libdSupport Daily • in 3h 4 m100% [2Tue 14 Apr 11:56:56• RequestGenerateAskJiminnyReportJobTest v= custom.log= laravel.loge SF (iminny@localhostc HS_local fiminny@localhost)& console (PROD]& console (EU]L console (STAGINGC AskJiminnyReportActivityService.phpRequestGenerateaskyiminnykeportJoblest.pnpV2 21 лclass ASkJ1minnyReportActiv1tyservice39--5061626364private const 1nt DEFAULI_/UP_ACIIVLILES_COUNl = 100;private const array [ENV_SECRET] START DATE.ActivitvActualDate::PARAM END DATE.ActivityUpdatedDate::PARAM_UPDATED_FROMActivityUpdatedDate::PARAM_UPDATED_ TO,ClosingPeriodFilter::KEY_START DATE.ClosingPer1odr1lter::KEY_END_DATE,pubLic tunction -_constructprivate readonly Aculvicysearch sacuivitysearch,private readonly ElasticActivitykeposicory selasclckepository.orvare reaconuy Loocerinuertace "Lodder• 4...3* Fetch activity IDs for a saved search, passing its filters as-is to Criteria* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint 1s applied - matching the behaviour of getcontextrorAskAnythingßyrilter.* @return string[] Activity IDs*/pubuic tunccion getAculvitylasrorsavedsearcncsearch ssaveosearch.iuser nuser.0: array 4SrequestParams = Sthis->buildRequestParamsFromSearchSsavedSearch, Suser):Scriteria = Criteria::createFromRequestarray_merge($requestParams, L'Limit' => seLf::DEFAULT_TOP_ACTIVITTES_COUNT, 'page' => 1J),suser->getlimezoneptilterser = suhls-›aculvitysearch-›gecunbemandrageriltersec(scriterla, suser))$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getido,'user id'=> Suser->getido'activity_count' => count($activitylds),1):return sactivitvids.private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array(...}w Windsur leams98.buir-oia 4 spaces...
|
10750
|
|
10754
|
213
|
46
|
2026-04-14T08:57:13.269003+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157033269_m2.jpg...
|
Firefox
|
CloudWatch | us-east-2 — Work
|
1
|
us-east-2.console.aws.amazon.com/cloudwatch/home?r us-east-2.console.aws.amazon.com/cloudwatch/home?region=us-east-2#logsV2:logs-insights$3FqueryDetail$3D~(end~0~start~-3600~timeType~'RELATIVE~tz~'UTC~unit~'seconds~editorString~'fields*20*40timestamp*2c*20*40message*2c*20*40logStream*2c*20*40log*0a*7c*20filter*20*40message*20like*20*22*5bAskJiminnyReport*3aGenerate*5d*22*20*0a*7c*20filter*20*40message*20not*20like*20*2fAnalytic*2f*20*7c*20filter*20*40message*20not*20like*20*2fTranscript*2f*0a*7c*20filter*20*40message*20not*20like*20*2fWebhook*2f*20*7c*20filter*20*40message*20not*20like*20*2fMeetingBot*2f*20*0a*7c*20limit*2010000~queryId~'0551e814-f51a-4339-8372-80d7ba4cef27~source~(~'*2a)~lang~'CWLI~logClass~'STANDARD~accountIDs~(~'All)~queryBy~'allLogGroups)...
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
JY-20543 add AJ reports User pilot tracking by Lak JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Console Home | Console Home | us-east-2
Console Home | Console Home | us-east-2
SecurityGroup | EC2 | us-east-2
SecurityGroup | EC2 | us-east-2
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app
SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app
Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet
Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet
Jiminny
Jiminny
Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf
Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf
Service-Desk - Queues - Platform team - Service space - Jira
Service-Desk - Queues - Platform team - Service space - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
CloudWatch | us-east-2
CloudWatch | us-east-2
New Tab
New Tab
CloudWatch | us-east-2
CloudWatch | us-east-2
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AWS Console Home
Skip to Main Content
Skip to Main Content
Amazon Q
Services
Search
Ask Amazon Q
[Option+S]
CloudShell
Notifications (none available)
Help & support
Settings
United States (Ohio)
United States (Ohio)
STAGE
Account ID: 4387-4037-0364
STAGE
EC2 EC2
EC2
Elastic Container Service Elastic Container Service
Elastic Container Service
S3 S3
S3
CodeDeploy CodeDeploy
CodeDeploy
CloudWatch CloudWatch
CloudWatch
ElastiCache ElastiCache
ElastiCache
Aurora and RDS Aurora and RDS
Aurora and RDS
Amazon OpenSearch Service Amazon OpenSearch Service
Amazon OpenSearch Service
CloudFront CloudFront
CloudFront
MediaLive MediaLive
MediaLive
Open side navigation
CloudWatch
CloudWatch
Logs Insights
Logs Insights
Query definition
Query definition
Info : Query definition
5m (5 Minutes)
30m (30 Minutes)
1h (1 Hour)
3h (3 Hours)
12h (12 Hours)
Custom
Custom
Compare (Off)
Compare
(
Off
)
Time zone UTC timezone
UTC timezone
Start tailing with selected log group (opens in a new tab)
Start tailing
Query scope
Query scope All log groups
All log groups
All log groups
Log class
Log class STANDARD
STANDARD
Account(s)
Account(s) Change Account(s)
Change Account(s)
Remove All accounts
Undo
Redo
Logs Insights QL
Query generator
Query generator
Fields
Saved and sample queries
Query commands
Run query
Cancel
Save
History
Completed. Query executed for
147 log groups.
View log groups used in query
Logs (10)
Logs
(
10
)
Patterns (5)
Patterns
(
5
)
Visualization
Visualization
Logs (10)
Logs (10)
Summarize results
Summarize results
Investigate
Investigate
Share results
Share results
Export results
Export results
Add to dashboard
Showing 10 of 10 records matched
107,195 records (265.0 MB) scanned in 3.2s @ 33,561 records/s (83.0 MB/s)
Hide histogram
Hide histogram
Filter table results
2026-04-14T08:41:12.165Z
[2026-04-14 08:41:12] staging.INFO: [AskJiminnyReport:Generate] Not enough activities, skipped {"automatedReportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","activityCount":0} {"correlation_id":"fe196b93-4966-4e27-ab20-b7acafbc543f","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab
438740370364:worker-analytics
2026-04-14T08:41:12.159Z
[2026-04-14 08:41:12] staging.INFO: [AskJiminnyReport:Generate] Fetched activity IDs {"automatedReportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","activityCount":0} {"correlation_id":"fe196b93-4966-4e27-ab20-b7acafbc543f","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab
438740370364:worker-analytics
2026-04-14T08:41:12.036Z
[2026-04-14 08:41:12] staging.INFO: [AskJiminnyReport:Generate] Started {"automatedReportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8"} {"correlation_id":"fe196b93-4966-4e27-ab20-b7acafbc543f","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab
438740370364:worker-analytics
2026-04-14T08:41:12.008Z
[2026-04-14 08:41:12] staging.INFO: [AskJiminnyReport:Generate] Response received {"response":{"message":"Ask Anything report request has been queued for processing","request_id":"38817a7e-954d-41a2-822a-6c01f7f00073","status":"queued"}} {"correlation_id":"214815ad-d355-43df-ab4a-ab3ad896c871","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab
438740370364:worker-analytics
2026-04-14T08:41:11.731Z
[2026-04-14 08:41:11] staging.INFO: [AskJiminnyReport:Generate] Request sent {"automatedReportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","reportUuid":"38817a7e-954d-41a2-822a-6c01f7f00073","payload":{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"38817a7e-954d-41a2-822a-6c01f7f00073","callback_url":"https://team:[EMAIL]/webhook/reports/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}} {"correlation_id":"214815ad-d355-43df-ab4a-ab3ad896c871","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab
438740370364:worker-analytics
2026-04-14T08:41:11.721Z
[2026-04-14 08:41:11] staging.INFO: [AskJiminnyReport:Generate] Fetched activity IDs {"automatedReportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","activityCount":100} {"correlation_id":"214815ad-d355-43df-ab4a-ab3ad896c871","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab
438740370364:worker-analytics
2026-04-14T08:41:11.233Z
[2026-04-14 08:41:11] staging.INFO: [AskJiminnyReport:Generate] Started {"automatedReportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9"} {"correlation_id":"214815ad-d355-43df-ab4a-ab3ad896c871","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab
438740370364:worker-analytics
2026-04-14T08:41:05.703Z
[2026-04-14 08:41:05] staging.INFO: [AskJiminnyReport:Generate] Not enough activities, skipped {"automatedReportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","activityCount":0} {"correlation_id":"9bf4065b-7aba-4dd9-8d33-042890e18be9","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab
438740370364:worker-analytics...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":4,"bounds":{"left":0.00234375,"top":0.045138888,"width":0.0890625,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira","depth":4,"bounds":{"left":0.0,"top":0.08263889,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira","depth":5,"bounds":{"left":0.015625,"top":0.09236111,"width":0.11796875,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":4,"bounds":{"left":0.0,"top":0.11111111,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":5,"bounds":{"left":0.015625,"top":0.12083333,"width":0.18710938,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Configure SSH access to multiple environment - Engineering - Confluence","depth":4,"bounds":{"left":0.0,"top":0.13958333,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Configure SSH access to multiple environment - Engineering - Confluence","depth":5,"bounds":{"left":0.015625,"top":0.14930555,"width":0.1515625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Console Home | Console Home | us-east-2","depth":4,"bounds":{"left":0.0,"top":0.16805555,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Console Home | Console Home | us-east-2","depth":5,"bounds":{"left":0.015625,"top":0.17777778,"width":0.08671875,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"SecurityGroup | EC2 | us-east-2","depth":4,"bounds":{"left":0.0,"top":0.19652778,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"SecurityGroup | EC2 | us-east-2","depth":5,"bounds":{"left":0.015625,"top":0.20625,"width":0.06484375,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":4,"bounds":{"left":0.0,"top":0.225,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":5,"bounds":{"left":0.015625,"top":0.23472223,"width":0.18710938,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app","depth":4,"bounds":{"left":0.0,"top":0.2534722,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app","depth":5,"bounds":{"left":0.015625,"top":0.26319444,"width":0.23476562,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet","depth":4,"bounds":{"left":0.0,"top":0.28194445,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet","depth":5,"bounds":{"left":0.015625,"top":0.29166666,"width":0.1984375,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Jiminny","depth":4,"bounds":{"left":0.0,"top":0.31041667,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Jiminny","depth":5,"bounds":{"left":0.015625,"top":0.3201389,"width":0.015625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf","depth":4,"bounds":{"left":0.0,"top":0.33888888,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf","depth":5,"bounds":{"left":0.015625,"top":0.34861112,"width":0.1640625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Service-Desk - Queues - Platform team - Service space - Jira","depth":4,"bounds":{"left":0.0,"top":0.3673611,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Service-Desk - Queues - Platform team - Service space - Jira","depth":5,"bounds":{"left":0.015625,"top":0.37708333,"width":0.12617187,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":4,"bounds":{"left":0.0,"top":0.39583334,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":5,"bounds":{"left":0.015625,"top":0.40555555,"width":0.18710938,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Configure SSH access to multiple environment - Engineering - Confluence","depth":4,"bounds":{"left":0.0,"top":0.42430556,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Configure SSH access to multiple environment - Engineering - Confluence","depth":5,"bounds":{"left":0.015625,"top":0.4340278,"width":0.1515625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"CloudWatch | us-east-2","depth":4,"bounds":{"left":0.0,"top":0.45277777,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"CloudWatch | us-east-2","depth":5,"bounds":{"left":0.015625,"top":0.4625,"width":0.0484375,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"New Tab","depth":4,"bounds":{"left":0.0,"top":0.48125,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"New Tab","depth":5,"bounds":{"left":0.015625,"top":0.49097222,"width":0.017578125,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"CloudWatch | us-east-2","depth":4,"bounds":{"left":0.0,"top":0.50972223,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true},{"role":"AXStaticText","text":"CloudWatch | us-east-2","depth":5,"bounds":{"left":0.015625,"top":0.51944447,"width":0.0484375,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Close tab","depth":5,"bounds":{"left":0.07890625,"top":0.5159722,"width":0.009375,"height":0.016666668},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"New Tab","depth":4,"bounds":{"left":0.003125,"top":0.5395833,"width":0.08710937,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Customize sidebar","depth":6,"bounds":{"left":0.003125,"top":0.97430557,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Open Google Gemini (⌃X)","depth":6,"bounds":{"left":0.01640625,"top":0.97430557,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Tabs from other devices","depth":6,"bounds":{"left":0.029296875,"top":0.97430557,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Open history (⇧⌘H)","depth":6,"bounds":{"left":0.0421875,"top":0.97430557,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Open bookmarks (⌘B)","depth":6,"bounds":{"left":0.05546875,"top":0.97430557,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXLink","text":"AWS Console Home","depth":13,"bounds":{"left":0.09375,"top":0.047916666,"width":0.025390625,"height":0.033333335},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXLink","text":"Skip to Main Content","depth":13,"bounds":{"left":0.09335937,"top":0.047222223,"width":0.0015625,"height":0.0013888889},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Skip to Main Content","depth":14,"bounds":{"left":0.09414063,"top":0.047916666,"width":0.01953125,"height":0.045138888},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Amazon Q","depth":14,"bounds":{"left":0.11953125,"top":0.047916666,"width":0.01953125,"height":0.033333335},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Services","depth":13,"bounds":{"left":0.1390625,"top":0.047916666,"width":0.01953125,"height":0.033333335},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXComboBox","text":"Search","depth":16,"bounds":{"left":0.15859374,"top":0.054166667,"width":0.2109375,"height":0.020833334},"role_description":"combo box","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Ask Amazon Q","depth":15,"bounds":{"left":0.35390624,"top":0.05625,"width":0.01171875,"height":0.016666668},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"[Option+S]","depth":16,"bounds":{"left":0.32851562,"top":0.058333334,"width":0.02734375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"CloudShell","depth":14,"bounds":{"left":0.78046876,"top":0.047916666,"width":0.01875,"height":0.033333335},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Notifications (none available)","depth":15,"bounds":{"left":0.7992188,"top":0.050694443,"width":0.01953125,"height":0.027777778},"help_text":"Notifications","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Help & support","depth":15,"bounds":{"left":0.81875,"top":0.047916666,"width":0.01953125,"height":0.033333335},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Settings","depth":15,"bounds":{"left":0.8382813,"top":0.047916666,"width":0.01953125,"height":0.033333335},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXComboBox","text":"United States (Ohio)","depth":15,"bounds":{"left":0.8578125,"top":0.047916666,"width":0.06328125,"height":0.033333335},"value":"United States (Ohio)","help_text":"United States (Ohio)","role_description":"combo box","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"United States (Ohio)","depth":17,"bounds":{"left":0.86445314,"top":0.059722222,"width":0.04375,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"STAGE","depth":15,"bounds":{"left":0.92109376,"top":0.047916666,"width":0.07890624,"height":0.033333335},"help_text":"Staging_View_Only @ jmny","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Account ID: 4387-4037-0364","depth":19,"bounds":{"left":0.92460936,"top":0.05,"width":0.06367187,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"STAGE","depth":18,"bounds":{"left":0.9777344,"top":0.065972224,"width":0.0140625,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"EC2 EC2","depth":16,"bounds":{"left":0.096875,"top":0.083333336,"width":0.023828125,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"EC2","depth":18,"bounds":{"left":0.109375,"top":0.088194445,"width":0.008203125,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Elastic Container Service Elastic Container Service","depth":16,"bounds":{"left":0.12070312,"top":0.083333336,"width":0.06757812,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Elastic Container Service","depth":18,"bounds":{"left":0.13320312,"top":0.088194445,"width":0.051953126,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"S3 S3","depth":16,"bounds":{"left":0.18828125,"top":0.083333336,"width":0.02109375,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"S3","depth":18,"bounds":{"left":0.20078126,"top":0.088194445,"width":0.00546875,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"CodeDeploy CodeDeploy","depth":16,"bounds":{"left":0.209375,"top":0.083333336,"width":0.04140625,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"CodeDeploy","depth":18,"bounds":{"left":0.221875,"top":0.088194445,"width":0.02578125,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"CloudWatch CloudWatch","depth":16,"bounds":{"left":0.25078124,"top":0.083333336,"width":0.04140625,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"CloudWatch","depth":18,"bounds":{"left":0.26328126,"top":0.088194445,"width":0.02578125,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"ElastiCache ElastiCache","depth":16,"bounds":{"left":0.2921875,"top":0.083333336,"width":0.03984375,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"ElastiCache","depth":18,"bounds":{"left":0.3046875,"top":0.088194445,"width":0.02421875,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Aurora and RDS Aurora and RDS","depth":16,"bounds":{"left":0.33203125,"top":0.083333336,"width":0.048828125,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Aurora and RDS","depth":18,"bounds":{"left":0.34453124,"top":0.088194445,"width":0.033203125,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Amazon OpenSearch Service Amazon OpenSearch Service","depth":16,"bounds":{"left":0.38085938,"top":0.083333336,"width":0.07421875,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Amazon OpenSearch Service","depth":18,"bounds":{"left":0.39335936,"top":0.088194445,"width":0.0609375,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"CloudFront CloudFront","depth":16,"bounds":{"left":0.45507812,"top":0.083333336,"width":0.039453126,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"CloudFront","depth":18,"bounds":{"left":0.4675781,"top":0.088194445,"width":0.023828125,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"MediaLive MediaLive","depth":16,"bounds":{"left":0.49453124,"top":0.083333336,"width":0.037109375,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"MediaLive","depth":18,"bounds":{"left":0.50703126,"top":0.088194445,"width":0.021484375,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXMenuButton","text":"Open side navigation","depth":13,"bounds":{"left":0.1,"top":0.108333334,"width":0.01171875,"height":0.020833334},"help_text":"","role_description":"menu button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"CloudWatch","depth":14,"bounds":{"left":0.11640625,"top":0.11111111,"width":0.031640626,"height":0.015277778},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"CloudWatch","depth":16,"bounds":{"left":0.1171875,"top":0.1125,"width":0.030078124,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Logs Insights","depth":14,"bounds":{"left":0.16054687,"top":0.11180556,"width":0.03359375,"height":0.013888889},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Logs Insights","depth":16,"bounds":{"left":0.16054687,"top":0.1125,"width":0.03359375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXHeading","text":"Query definition","depth":26,"bounds":{"left":0.1125,"top":0.14513889,"width":0.059375,"height":0.017361112},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXButton","text":"Query definition","depth":28,"bounds":{"left":0.10234375,"top":0.14513889,"width":0.06953125,"height":0.017361112},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":true},{"role":"AXButton","text":"Info : Query definition","depth":27,"bounds":{"left":0.175,"top":0.15069444,"width":0.008984375,"height":0.010416667},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"5m (5 Minutes)","depth":27,"bounds":{"left":0.66445315,"top":0.14652778,"width":0.014453125,"height":0.013888889},"help_text":"5 Minutes","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"30m (30 Minutes)","depth":27,"bounds":{"left":0.68789065,"top":0.14652778,"width":0.017578125,"height":0.013888889},"help_text":"30 Minutes","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"1h (1 Hour)","depth":27,"bounds":{"left":0.7140625,"top":0.14652778,"width":0.012890625,"height":0.013888889},"help_text":"1 Hour","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"3h (3 Hours)","depth":27,"bounds":{"left":0.7359375,"top":0.14652778,"width":0.012890625,"height":0.013888889},"help_text":"3 Hours","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"12h (12 Hours)","depth":27,"bounds":{"left":0.7578125,"top":0.14652778,"width":0.015625,"height":0.013888889},"help_text":"12 Hours","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Custom","depth":27,"bounds":{"left":0.7824219,"top":0.14652778,"width":0.028515626,"height":0.013888889},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Custom","depth":29,"bounds":{"left":0.7824219,"top":0.14722222,"width":0.019140625,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXCheckBox","text":"Compare (Off)","depth":26,"bounds":{"left":0.81875,"top":0.14305556,"width":0.0546875,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Compare","depth":27,"bounds":{"left":0.82734376,"top":0.14791666,"width":0.023046875,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"(","depth":27,"bounds":{"left":0.8503906,"top":0.14791666,"width":0.003515625,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Off","depth":27,"bounds":{"left":0.8539063,"top":0.14791666,"width":0.008984375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":")","depth":27,"bounds":{"left":0.8628906,"top":0.14791666,"width":0.001953125,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Time zone UTC timezone","depth":26,"bounds":{"left":0.8761719,"top":0.14305556,"width":0.054296874,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"UTC timezone","depth":28,"bounds":{"left":0.88125,"top":0.14791666,"width":0.034765624,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Start tailing with selected log group (opens in a new tab)","depth":26,"bounds":{"left":0.9351562,"top":0.14305556,"width":0.056640625,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Start tailing","depth":27,"bounds":{"left":0.9515625,"top":0.14791666,"width":0.031640626,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Query scope","depth":28,"bounds":{"left":0.10234375,"top":0.18402778,"width":0.03203125,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Query scope All log groups","depth":27,"bounds":{"left":0.10234375,"top":0.20416667,"width":0.078125,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"All log groups","depth":29,"bounds":{"left":0.107421875,"top":0.20902778,"width":0.034375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXTextField","text":"All log groups","depth":26,"bounds":{"left":0.1875,"top":0.20416667,"width":0.68242186,"height":0.022222223},"help_text":"","role_description":"search text field","subrole":"AXSearchField","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Log class","depth":28,"bounds":{"left":0.8730469,"top":0.18402778,"width":0.0234375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Log class STANDARD","depth":27,"bounds":{"left":0.8730469,"top":0.20416667,"width":0.0484375,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"STANDARD","depth":29,"bounds":{"left":0.878125,"top":0.20902778,"width":0.027734375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Account(s)","depth":28,"bounds":{"left":0.92460936,"top":0.18402778,"width":0.026953125,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Account(s) Change Account(s)","depth":27,"bounds":{"left":0.92460936,"top":0.20416667,"width":0.0625,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Change Account(s)","depth":29,"bounds":{"left":0.9296875,"top":0.20902778,"width":0.04453125,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Remove All accounts","depth":29,"bounds":{"left":0.96132815,"top":0.2361111,"width":0.01015625,"height":0.015277778},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Undo","depth":28,"bounds":{"left":0.9332031,"top":0.37361112,"width":0.0109375,"height":0.013888889},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Redo","depth":28,"bounds":{"left":0.9472656,"top":0.37361112,"width":0.0109375,"height":0.013888889},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXMenuButton","text":"Logs Insights QL","depth":29,"bounds":{"left":0.10898437,"top":0.4027778,"width":0.06796875,"height":0.022222223},"help_text":"","role_description":"menu button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Query generator","depth":26,"bounds":{"left":0.18007812,"top":0.4,"width":0.061328124,"height":0.028472222},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Query generator","depth":28,"bounds":{"left":0.19414063,"top":0.40694445,"width":0.042578124,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Fields","depth":28,"bounds":{"left":0.25390625,"top":0.40694445,"width":0.015234375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Saved and sample queries","depth":28,"bounds":{"left":0.28632814,"top":0.40694445,"width":0.06640625,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Query commands","depth":28,"bounds":{"left":0.36992186,"top":0.40694445,"width":0.0453125,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Run query","depth":27,"bounds":{"left":0.10234375,"top":0.4375,"width":0.044140626,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Cancel","depth":27,"bounds":{"left":0.14960937,"top":0.4375,"width":0.034375,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Save","depth":27,"bounds":{"left":0.18710938,"top":0.4375,"width":0.02890625,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"History","depth":27,"bounds":{"left":0.29140624,"top":0.4375,"width":0.036328126,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Completed. Query executed for","depth":28,"bounds":{"left":0.11015625,"top":0.46597221,"width":0.07773437,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"147 log groups.","depth":28,"bounds":{"left":0.18945312,"top":0.46597221,"width":0.038671874,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"View log groups used in query","depth":28,"bounds":{"left":0.2296875,"top":0.46597221,"width":0.00625,"height":0.0125},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"Logs (10)","depth":25,"bounds":{"left":0.09765625,"top":0.49722221,"width":0.03671875,"height":0.030555556},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true},{"role":"AXStaticText","text":"Logs","depth":27,"bounds":{"left":0.10234375,"top":0.50555557,"width":0.013671875,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"(","depth":27,"bounds":{"left":0.11757813,"top":0.50555557,"width":0.00234375,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"10","depth":27,"bounds":{"left":0.11992188,"top":0.50555557,"width":0.007421875,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":")","depth":27,"bounds":{"left":0.12734374,"top":0.50555557,"width":0.001953125,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Patterns (5)","depth":25,"bounds":{"left":0.14101562,"top":0.49722221,"width":0.04453125,"height":0.030555556},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Patterns","depth":27,"bounds":{"left":0.14570312,"top":0.50555557,"width":0.025,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"(","depth":27,"bounds":{"left":0.17070313,"top":0.50555557,"width":0.00390625,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"5","depth":27,"bounds":{"left":0.17460938,"top":0.50555557,"width":0.003515625,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":")","depth":27,"bounds":{"left":0.178125,"top":0.50555557,"width":0.00234375,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Visualization","depth":25,"bounds":{"left":0.1921875,"top":0.49722221,"width":0.04765625,"height":0.030555556},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Visualization","depth":27,"bounds":{"left":0.196875,"top":0.50555557,"width":0.037890624,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXHeading","text":"Logs (10)","depth":26,"bounds":{"left":0.10195313,"top":0.5361111,"width":0.0328125,"height":0.017361112},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Logs (10)","depth":27,"bounds":{"left":0.10195313,"top":0.5361111,"width":0.0328125,"height":0.017361112},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Summarize results","depth":26,"bounds":{"left":0.60234374,"top":0.5326389,"width":0.07304688,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Summarize results","depth":27,"bounds":{"left":0.61875,"top":0.5375,"width":0.048046876,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXMenuButton","text":"Investigate","depth":28,"bounds":{"left":0.6785156,"top":0.5326389,"width":0.062109374,"height":0.022222223},"help_text":"","role_description":"menu button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Investigate","depth":29,"bounds":{"left":0.69570315,"top":0.5375,"width":0.028515626,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Share results","depth":26,"bounds":{"left":0.74375,"top":0.5326389,"width":0.058984376,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Share results","depth":27,"bounds":{"left":0.7601563,"top":0.5375,"width":0.033984374,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXMenuButton","text":"Export results","depth":28,"bounds":{"left":0.8058594,"top":0.5326389,"width":0.0609375,"height":0.022222223},"help_text":"","role_description":"menu button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Export results","depth":29,"bounds":{"left":0.8144531,"top":0.5375,"width":0.0359375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Add to dashboard","depth":26,"bounds":{"left":0.86992186,"top":0.5326389,"width":0.06367187,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Showing 10 of 10 records matched","depth":29,"bounds":{"left":0.48125,"top":0.5673611,"width":0.09492187,"height":0.014583333},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"107,195 records (265.0 MB) scanned in 3.2s @ 33,561 records/s (83.0 MB/s)","depth":29,"bounds":{"left":0.43515626,"top":0.58263886,"width":0.1875,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Hide histogram","depth":26,"bounds":{"left":0.959375,"top":0.5659722,"width":0.03671875,"height":0.029861111},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Hide histogram","depth":27,"bounds":{"left":0.959375,"top":0.5673611,"width":0.0328125,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXTextField","text":"Filter table results","depth":25,"bounds":{"left":0.09882812,"top":0.6701389,"width":0.253125,"height":0.022222223},"help_text":"","placeholder":"Filter table results (case insensitive)...","role_description":"search text field","subrole":"AXSearchField","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"2026-04-14T08:41:12.165Z","depth":29,"bounds":{"left":0.12070312,"top":0.73680556,"width":0.0671875,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"[2026-04-14 08:41:12] staging.INFO: [AskJiminnyReport:Generate] Not enough activities, skipped {\"automatedReportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"activityCount\":0} {\"correlation_id\":\"fe196b93-4966-4e27-ab20-b7acafbc543f\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}","depth":29,"bounds":{"left":0.196875,"top":0.73680556,"width":0.79609376,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab","depth":29,"bounds":{"left":0.88984376,"top":0.73680556,"width":0.11015624,"height":0.010416667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"438740370364:worker-analytics","depth":29,"bounds":{"left":1.0,"top":0.73680556,"width":-0.0851562,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"2026-04-14T08:41:12.159Z","depth":29,"bounds":{"left":0.12070312,"top":0.75555557,"width":0.0671875,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"[2026-04-14 08:41:12] staging.INFO: [AskJiminnyReport:Generate] Fetched activity IDs {\"automatedReportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"activityCount\":0} {\"correlation_id\":\"fe196b93-4966-4e27-ab20-b7acafbc543f\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}","depth":29,"bounds":{"left":0.196875,"top":0.75555557,"width":0.7679688,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab","depth":29,"bounds":{"left":0.88984376,"top":0.75555557,"width":0.11015624,"height":0.010416667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"438740370364:worker-analytics","depth":29,"bounds":{"left":1.0,"top":0.75555557,"width":-0.0851562,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"2026-04-14T08:41:12.036Z","depth":29,"bounds":{"left":0.12070312,"top":0.7743056,"width":0.0671875,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"[2026-04-14 08:41:12] staging.INFO: [AskJiminnyReport:Generate] Started {\"automatedReportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\"} {\"correlation_id\":\"fe196b93-4966-4e27-ab20-b7acafbc543f\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}","depth":29,"bounds":{"left":0.196875,"top":0.7743056,"width":0.68046874,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab","depth":29,"bounds":{"left":0.88984376,"top":0.7743056,"width":0.11015624,"height":0.010416667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"438740370364:worker-analytics","depth":29,"bounds":{"left":1.0,"top":0.7743056,"width":-0.0851562,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"2026-04-14T08:41:12.008Z","depth":29,"bounds":{"left":0.12070312,"top":0.79305553,"width":0.0671875,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"[2026-04-14 08:41:12] staging.INFO: [AskJiminnyReport:Generate] Response received {\"response\":{\"message\":\"Ask Anything report request has been queued for processing\",\"request_id\":\"38817a7e-954d-41a2-822a-6c01f7f00073\",\"status\":\"queued\"}} {\"correlation_id\":\"214815ad-d355-43df-ab4a-ab3ad896c871\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}","depth":29,"bounds":{"left":0.196875,"top":0.79305553,"width":0.803125,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab","depth":29,"bounds":{"left":0.88984376,"top":0.79305553,"width":0.11015624,"height":0.010416667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"438740370364:worker-analytics","depth":29,"bounds":{"left":1.0,"top":0.79305553,"width":-0.0851562,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"2026-04-14T08:41:11.731Z","depth":29,"bounds":{"left":0.12070312,"top":0.81180555,"width":0.0671875,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"[2026-04-14 08:41:11] staging.INFO: [AskJiminnyReport:Generate] Request sent {\"automatedReportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"reportUuid\":\"38817a7e-954d-41a2-822a-6c01f7f00073\",\"payload\":{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"38817a7e-954d-41a2-822a-6c01f7f00073\",\"callback_url\":\"https://team:5hgTDUyu1vqCd@app.staging.jiminny.com/webhook/reports/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}} {\"correlation_id\":\"214815ad-d355-43df-ab4a-ab3ad896c871\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}","depth":29,"bounds":{"left":0.196875,"top":0.81180555,"width":0.803125,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab","depth":29,"bounds":{"left":0.88984376,"top":0.81180555,"width":0.11015624,"height":0.010416667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"438740370364:worker-analytics","depth":29,"bounds":{"left":1.0,"top":0.81180555,"width":-0.0851562,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"2026-04-14T08:41:11.721Z","depth":29,"bounds":{"left":0.12070312,"top":0.83055556,"width":0.0671875,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"[2026-04-14 08:41:11] staging.INFO: [AskJiminnyReport:Generate] Fetched activity IDs {\"automatedReportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"activityCount\":100} {\"correlation_id\":\"214815ad-d355-43df-ab4a-ab3ad896c871\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}","depth":29,"bounds":{"left":0.196875,"top":0.83055556,"width":0.7734375,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab","depth":29,"bounds":{"left":0.88984376,"top":0.83055556,"width":0.11015624,"height":0.010416667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"438740370364:worker-analytics","depth":29,"bounds":{"left":1.0,"top":0.83055556,"width":-0.0851562,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"2026-04-14T08:41:11.233Z","depth":29,"bounds":{"left":0.12070312,"top":0.84930557,"width":0.0671875,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"[2026-04-14 08:41:11] staging.INFO: [AskJiminnyReport:Generate] Started {\"automatedReportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\"} {\"correlation_id\":\"214815ad-d355-43df-ab4a-ab3ad896c871\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}","depth":29,"bounds":{"left":0.196875,"top":0.84930557,"width":0.68046874,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab","depth":29,"bounds":{"left":0.88984376,"top":0.84930557,"width":0.11015624,"height":0.010416667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"438740370364:worker-analytics","depth":29,"bounds":{"left":1.0,"top":0.84930557,"width":-0.0851562,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"2026-04-14T08:41:05.703Z","depth":29,"bounds":{"left":0.12070312,"top":0.8680556,"width":0.0671875,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"[2026-04-14 08:41:05] staging.INFO: [AskJiminnyReport:Generate] Not enough activities, skipped {\"automatedReportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"activityCount\":0} {\"correlation_id\":\"9bf4065b-7aba-4dd9-8d33-042890e18be9\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}","depth":29,"bounds":{"left":0.196875,"top":0.8680556,"width":0.79609376,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab","depth":29,"bounds":{"left":0.88984376,"top":0.8680556,"width":0.11015624,"height":0.010416667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"438740370364:worker-analytics","depth":29,"bounds":{"left":1.0,"top":0.8680556,"width":-0.0851562,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"}]...
|
1853173515234879477
|
4111014128032807078
|
visual_change
|
accessibility
|
NULL
|
JY-20543 add AJ reports User pilot tracking by Lak JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Console Home | Console Home | us-east-2
Console Home | Console Home | us-east-2
SecurityGroup | EC2 | us-east-2
SecurityGroup | EC2 | us-east-2
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app
SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app
Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet
Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet
Jiminny
Jiminny
Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf
Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf
Service-Desk - Queues - Platform team - Service space - Jira
Service-Desk - Queues - Platform team - Service space - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
CloudWatch | us-east-2
CloudWatch | us-east-2
New Tab
New Tab
CloudWatch | us-east-2
CloudWatch | us-east-2
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AWS Console Home
Skip to Main Content
Skip to Main Content
Amazon Q
Services
Search
Ask Amazon Q
[Option+S]
CloudShell
Notifications (none available)
Help & support
Settings
United States (Ohio)
United States (Ohio)
STAGE
Account ID: 4387-4037-0364
STAGE
EC2 EC2
EC2
Elastic Container Service Elastic Container Service
Elastic Container Service
S3 S3
S3
CodeDeploy CodeDeploy
CodeDeploy
CloudWatch CloudWatch
CloudWatch
ElastiCache ElastiCache
ElastiCache
Aurora and RDS Aurora and RDS
Aurora and RDS
Amazon OpenSearch Service Amazon OpenSearch Service
Amazon OpenSearch Service
CloudFront CloudFront
CloudFront
MediaLive MediaLive
MediaLive
Open side navigation
CloudWatch
CloudWatch
Logs Insights
Logs Insights
Query definition
Query definition
Info : Query definition
5m (5 Minutes)
30m (30 Minutes)
1h (1 Hour)
3h (3 Hours)
12h (12 Hours)
Custom
Custom
Compare (Off)
Compare
(
Off
)
Time zone UTC timezone
UTC timezone
Start tailing with selected log group (opens in a new tab)
Start tailing
Query scope
Query scope All log groups
All log groups
All log groups
Log class
Log class STANDARD
STANDARD
Account(s)
Account(s) Change Account(s)
Change Account(s)
Remove All accounts
Undo
Redo
Logs Insights QL
Query generator
Query generator
Fields
Saved and sample queries
Query commands
Run query
Cancel
Save
History
Completed. Query executed for
147 log groups.
View log groups used in query
Logs (10)
Logs
(
10
)
Patterns (5)
Patterns
(
5
)
Visualization
Visualization
Logs (10)
Logs (10)
Summarize results
Summarize results
Investigate
Investigate
Share results
Share results
Export results
Export results
Add to dashboard
Showing 10 of 10 records matched
107,195 records (265.0 MB) scanned in 3.2s @ 33,561 records/s (83.0 MB/s)
Hide histogram
Hide histogram
Filter table results
2026-04-14T08:41:12.165Z
[2026-04-14 08:41:12] staging.INFO: [AskJiminnyReport:Generate] Not enough activities, skipped {"automatedReportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","activityCount":0} {"correlation_id":"fe196b93-4966-4e27-ab20-b7acafbc543f","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab
438740370364:worker-analytics
2026-04-14T08:41:12.159Z
[2026-04-14 08:41:12] staging.INFO: [AskJiminnyReport:Generate] Fetched activity IDs {"automatedReportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","activityCount":0} {"correlation_id":"fe196b93-4966-4e27-ab20-b7acafbc543f","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab
438740370364:worker-analytics
2026-04-14T08:41:12.036Z
[2026-04-14 08:41:12] staging.INFO: [AskJiminnyReport:Generate] Started {"automatedReportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8"} {"correlation_id":"fe196b93-4966-4e27-ab20-b7acafbc543f","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab
438740370364:worker-analytics
2026-04-14T08:41:12.008Z
[2026-04-14 08:41:12] staging.INFO: [AskJiminnyReport:Generate] Response received {"response":{"message":"Ask Anything report request has been queued for processing","request_id":"38817a7e-954d-41a2-822a-6c01f7f00073","status":"queued"}} {"correlation_id":"214815ad-d355-43df-ab4a-ab3ad896c871","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab
438740370364:worker-analytics
2026-04-14T08:41:11.731Z
[2026-04-14 08:41:11] staging.INFO: [AskJiminnyReport:Generate] Request sent {"automatedReportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","reportUuid":"38817a7e-954d-41a2-822a-6c01f7f00073","payload":{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"38817a7e-954d-41a2-822a-6c01f7f00073","callback_url":"https://team:[EMAIL]/webhook/reports/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}} {"correlation_id":"214815ad-d355-43df-ab4a-ab3ad896c871","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab
438740370364:worker-analytics
2026-04-14T08:41:11.721Z
[2026-04-14 08:41:11] staging.INFO: [AskJiminnyReport:Generate] Fetched activity IDs {"automatedReportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","activityCount":100} {"correlation_id":"214815ad-d355-43df-ab4a-ab3ad896c871","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab
438740370364:worker-analytics
2026-04-14T08:41:11.233Z
[2026-04-14 08:41:11] staging.INFO: [AskJiminnyReport:Generate] Started {"automatedReportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9"} {"correlation_id":"214815ad-d355-43df-ab4a-ab3ad896c871","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab
438740370364:worker-analytics
2026-04-14T08:41:05.703Z
[2026-04-14 08:41:05] staging.INFO: [AskJiminnyReport:Generate] Not enough activities, skipped {"automatedReportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","activityCount":0} {"correlation_id":"9bf4065b-7aba-4dd9-8d33-042890e18be9","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
worker-analytics/worker-analytics/f5f75b59051b4979aafbc4c1279529e2 Opens in a new tab
438740370364:worker-analytics...
|
NULL
|
|
10755
|
213
|
47
|
2026-04-14T08:57:16.282306+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157036282_m2.jpg...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityService.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14960937,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.76171875,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"bounds":{"left":0.7796875,"top":0.017361112,"width":0.12109375,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.45,"top":0.1736111,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.46132812,"top":0.17222223,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.4699219,"top":0.17222223,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.9476563,"top":0.0875,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.959375,"top":0.0875,"width":0.00859375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.9699219,"top":0.08611111,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.9785156,"top":0.08611111,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.0140625,"top":0.041666668,"width":0.028515626,"height":0.021527778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-1920847021272450725
|
-5390502312724452628
|
visual_change
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
10754
|
|
10756
|
212
|
39
|
2026-04-14T08:57:20.962805+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157040962_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 3 m100% CTue 14 Apr 11:57:20ec2-user@ip-10-30-93-249:~DOCKER• 8812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
1601717750835749026
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 3 m100% CTue 14 Apr 11:57:20ec2-user@ip-10-30-93-249:~DOCKER• 8812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
10752
|
|
10757
|
213
|
48
|
2026-04-14T08:57:20.939747+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157040939_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEoitViewNavigateCodelaraveRefactonTool PhpStormFileEoitViewNavigateCodelaraveRefactonToolsWindowHelpFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vProject v© DeviceRepository.phpC ElasticActivityRepository.p© EmailMessageRepository.p© GenericAiPromptRepositor© GroupRepository.php(C InboxEmailBatchRepositor)C InboxRepository.pnp© InvitationRepository.phpC) JobRepository.phpC) LanquageRepository.php© MomentRepository.phpNotificationRepository.phpC) ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.phpC PlavlistActivityRepository.p(© PlaylistRepository.png(C PlaylistShareRepository.phC) QuestionRepository.phpC) RoleChangeEventRepositolC RoleRepository.php© SearchRepository.phpC SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.(C) TaskRepository.phoC TeamAiContextRepository.C TeamDomainsRepository.p(©) TeaminsightsRepository.phC) TeamRepository.phpC ThemeRepository.phpC TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.phpC) TranscriptionModelLocaleF© TranscriptionRepository.prC) TranscriptionSummarvRepC UserRepository.php© VocabularyRepository.pnp> _ Rulesv D Services>D Activity>D AReportsAvatarcalendarM ConferenceM Crm>MImport> MInternalv → Kioskv _ AutomatedReports(C) ActivityTypeService.(©) AskJiminnyReportAc(C) AutomatedReportse(C) AutomatedReportsSc) ReportController.onpJiminnybeouecommana.ongC AutomatedReportsSendCommand.php© AutomatedReportsCommand.phpC AddLayoutEntities.phpC Team.phpC AutomatedReportsRepository.pnp© AutomatedReportsService.phpCreateHeldActivityEvent.phpe) Track?roviderinstalled-vent.ono© CreateActivityLoggedevent.php(©) UserPilotActivityListener.php©) ActivityLogged.phpC) AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.phpRequestGeneratekeporJob.onoC AutomatedReportResult.php(e AutomatedRenort.ohrclass RequestGenerateAskJ1minnyReportJob 1mplements ShouldQueue, ShouldBeUnique81831100101102103104105106ML0/I1081091110111112113114115116public function handlel1):Tecurtin"savedsearch = vauronareckedort-eravedsearchloif (SsavedSearch === null) &+Logger->warninglselt..Loo_PkErLX•'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1):lecurisprompt = sautomatedReport->getAskAnythingPrompton1T (sprompt === nULU) 1$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', ['aucomatedkeporcuuld = suhis->reporcuuld,recurn,$this->reportResult = SreportService->createReportResult(automatedReport: sautomatedReport,data: L'status' => AutomatedReportResult::STATUS_DEFAULT,"medla_type => Automacedkeporcsservice:.REULA_TYPE_PUr.MactivitvIds = $activitvService->getActivitvIdsForSavedSearch(savedSearch: $savedSearch,usel. peledtor,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', ['automatedReportuuld' => sth1s->reportuuld,activitycount = count(sactivitylas),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {Sthis->failReport@ reason: AutomatedReportResult::REASON_NOT ENOUGH ACTIVTTIES):$Logger->info(self::LOG_PREFIXNot enough activities, skipped', l'automatedReportUuid' => $this->reportUvid,'activityCount" => count(Sactivitylds),1);PecurtldWinasurt changelog 2.12.21: A new version is avallable. l View Changelog (today 10:35)Support Daily • in 3 h 3 m100% [Tue 14 Apr 11:57:20• RequestGenerateAskJiminnyReportJobTest v= custom.log= laravel.loge SF (iminny@localhostc HS_local fiminny@localhost)& console (PROD]& console (EU]L console (STAGINGC AskJiminnyReportActivityService.phpRequestGenerateaskJiminnykeportJoblest.phpV2 21 лclass ASkJ1minnyReportActiv1tyservice39-- 5061626364private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET] START DATE.ActivitvActualDate::PARAM END DATE.ActivityUpdatedDate::PARAM_UPDATED_FROMActivityUpdatedDate::PARAM_ UPDATED_ TO.ClosingPeriodFilter::KEY_START DATE.ClosingPer1odr1lter::KEY_END_DATE,pubLic tunction -_constructprivate readonly Aculvitysearch saculvitysearch,private readonly ElasticAculvitykeposicory selasclcкepos1cory.orvare reaconuy Loocerinuertace "Lodder• 4...3* Fetch activity IDs for a saved search, passing its filters as-is to Criteria* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint 1s applied - matching the behaviour of getcontextrorAskAnythingßyrilter.* @return string[] Activity IDspubuic tunccion getAcuivity.asrorsavedsearchcsearch ssaveosearch.iuser nuser.0: array 4SrequestParams = Sthis->buildRequestParamsFromSearchSsavedSearch, Suser):Scriteria = Criteria::createFromRequestoarray_merge(srequestParams, l'Lim1t => self::DEFAULT_T0P_ACTIVIT1ES_COUN/, 'page' => 1J)suser->getlimezoneptilterser = suhls-›aculvitysearch-›gecunbemandrageriltersec(ocriterla, suser)i$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AskJiminnyReport] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getido,'user id'= Suser->getido'activity_count' => count($activitylds),1):return sactivitvids.private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array(...hW Winasunt leams518/28 charsuir-oia 4 spaces...
|
NULL
|
-5441216465941457643
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEoitViewNavigateCodelaraveRefactonTool PhpStormFileEoitViewNavigateCodelaraveRefactonToolsWindowHelpFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vProject v© DeviceRepository.phpC ElasticActivityRepository.p© EmailMessageRepository.p© GenericAiPromptRepositor© GroupRepository.php(C InboxEmailBatchRepositor)C InboxRepository.pnp© InvitationRepository.phpC) JobRepository.phpC) LanquageRepository.php© MomentRepository.phpNotificationRepository.phpC) ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.phpC PlavlistActivityRepository.p(© PlaylistRepository.png(C PlaylistShareRepository.phC) QuestionRepository.phpC) RoleChangeEventRepositolC RoleRepository.php© SearchRepository.phpC SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.(C) TaskRepository.phoC TeamAiContextRepository.C TeamDomainsRepository.p(©) TeaminsightsRepository.phC) TeamRepository.phpC ThemeRepository.phpC TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.phpC) TranscriptionModelLocaleF© TranscriptionRepository.prC) TranscriptionSummarvRepC UserRepository.php© VocabularyRepository.pnp> _ Rulesv D Services>D Activity>D AReportsAvatarcalendarM ConferenceM Crm>MImport> MInternalv → Kioskv _ AutomatedReports(C) ActivityTypeService.(©) AskJiminnyReportAc(C) AutomatedReportse(C) AutomatedReportsSc) ReportController.onpJiminnybeouecommana.ongC AutomatedReportsSendCommand.php© AutomatedReportsCommand.phpC AddLayoutEntities.phpC Team.phpC AutomatedReportsRepository.pnp© AutomatedReportsService.phpCreateHeldActivityEvent.phpe) Track?roviderinstalled-vent.ono© CreateActivityLoggedevent.php(©) UserPilotActivityListener.php©) ActivityLogged.phpC) AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.phpRequestGeneratekeporJob.onoC AutomatedReportResult.php(e AutomatedRenort.ohrclass RequestGenerateAskJ1minnyReportJob 1mplements ShouldQueue, ShouldBeUnique81831100101102103104105106ML0/I1081091110111112113114115116public function handlel1):Tecurtin"savedsearch = vauronareckedort-eravedsearchloif (SsavedSearch === null) &+Logger->warninglselt..Loo_PkErLX•'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1):lecurisprompt = sautomatedReport->getAskAnythingPrompton1T (sprompt === nULU) 1$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', ['aucomatedkeporcuuld = suhis->reporcuuld,recurn,$this->reportResult = SreportService->createReportResult(automatedReport: sautomatedReport,data: L'status' => AutomatedReportResult::STATUS_DEFAULT,"medla_type => Automacedkeporcsservice:.REULA_TYPE_PUr.MactivitvIds = $activitvService->getActivitvIdsForSavedSearch(savedSearch: $savedSearch,usel. peledtor,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', ['automatedReportuuld' => sth1s->reportuuld,activitycount = count(sactivitylas),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {Sthis->failReport@ reason: AutomatedReportResult::REASON_NOT ENOUGH ACTIVTTIES):$Logger->info(self::LOG_PREFIXNot enough activities, skipped', l'automatedReportUuid' => $this->reportUvid,'activityCount" => count(Sactivitylds),1);PecurtldWinasurt changelog 2.12.21: A new version is avallable. l View Changelog (today 10:35)Support Daily • in 3 h 3 m100% [Tue 14 Apr 11:57:20• RequestGenerateAskJiminnyReportJobTest v= custom.log= laravel.loge SF (iminny@localhostc HS_local fiminny@localhost)& console (PROD]& console (EU]L console (STAGINGC AskJiminnyReportActivityService.phpRequestGenerateaskJiminnykeportJoblest.phpV2 21 лclass ASkJ1minnyReportActiv1tyservice39-- 5061626364private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET] START DATE.ActivitvActualDate::PARAM END DATE.ActivityUpdatedDate::PARAM_UPDATED_FROMActivityUpdatedDate::PARAM_ UPDATED_ TO.ClosingPeriodFilter::KEY_START DATE.ClosingPer1odr1lter::KEY_END_DATE,pubLic tunction -_constructprivate readonly Aculvitysearch saculvitysearch,private readonly ElasticAculvitykeposicory selasclcкepos1cory.orvare reaconuy Loocerinuertace "Lodder• 4...3* Fetch activity IDs for a saved search, passing its filters as-is to Criteria* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint 1s applied - matching the behaviour of getcontextrorAskAnythingßyrilter.* @return string[] Activity IDspubuic tunccion getAcuivity.asrorsavedsearchcsearch ssaveosearch.iuser nuser.0: array 4SrequestParams = Sthis->buildRequestParamsFromSearchSsavedSearch, Suser):Scriteria = Criteria::createFromRequestoarray_merge(srequestParams, l'Lim1t => self::DEFAULT_T0P_ACTIVIT1ES_COUN/, 'page' => 1J)suser->getlimezoneptilterser = suhls-›aculvitysearch-›gecunbemandrageriltersec(ocriterla, suser)i$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AskJiminnyReport] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getido,'user id'= Suser->getido'activity_count' => count($activitylds),1):return sactivitvids.private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array(...hW Winasunt leams518/28 charsuir-oia 4 spaces...
|
NULL
|
|
10758
|
213
|
49
|
2026-04-14T08:57:23.579798+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157043579_m2.jpg...
|
PhpStorm
|
faVsco.js – RequestGenerateAskJiminnyReportJob.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14960937,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.76171875,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"bounds":{"left":0.7796875,"top":0.017361112,"width":0.12109375,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.45,"top":0.1736111,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.46132812,"top":0.17222223,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.4699219,"top":0.17222223,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.9476563,"top":0.0875,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.959375,"top":0.0875,"width":0.00859375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.9699219,"top":0.08611111,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.9785156,"top":0.08611111,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false}]...
|
394417718078380112
|
-5390502312723666196
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}...
|
10757
|
|
10759
|
212
|
40
|
2026-04-14T08:57:23.579849+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157043579_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 3 m100% CTue 14 Apr 11:57:23ec2-user@ip-10-30-93-249:~DOCKER• 8812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
6424856123930617550
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 3 m100% CTue 14 Apr 11:57:23ec2-user@ip-10-30-93-249:~DOCKER• 8812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
|
10760
|
212
|
41
|
2026-04-14T08:57:25.612819+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157045612_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 3 m100% CTue 14 Apr 11:57:25ec2-user@ip-10-30-93-249:~DOCKER• 8812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
6319840044257726097
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 3 m100% CTue 14 Apr 11:57:25ec2-user@ip-10-30-93-249:~DOCKER• 8812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId":1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f''}root@73b64f5d54a3:/home/jiminny#l...
|
10759
|
|
10761
|
213
|
50
|
2026-04-14T08:57:25.622717+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157045622_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php© InboxEmailBatchRepositoryInboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> D AjReportsD AvatarcalendarD ConferenceD Crm>MImport> MInternallv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© AutomatedReportsCommand.phpJiminnybeouecommana.ong© AddLayoutEntities.php© AutomatedReportsService.phpCreateHeldActivityEvent.phpUserPilotActivityListener.php© ActivityLogged.phpRequestGenerateAskJiminnyReportJob.php© AutomatedReportsSendCommand.phpC Team.php© AutomatedReportsRepository.php© TrackProviderInstalledEvent.php© CreateActivityLoggedEvent.php© AutomatedReportsCallbackService.phpRequestGeneratekeporJob.onoC AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUniquepublic function handle(1):818283100101102103104105106107108109110111112113114115116Tecurtin$savedSearch = $automatedReport->getSavedSearch;if ($savedSearch === null) {+Logger->warninglselt..Luo_PkErLX'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1):lecuri$prompt = $automatedReport->getAskAnythingPrompt();if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', I'aucomatedkeporcuuld = suhis->reporcuuld,1):recurn,$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService: :MEDIA_TYPE_PDF,$activityIds = $activityService->getActivityIdsForSavedSearchCsavedsearch. ssaveasearch,usel. sul calolr$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', I'automatedReportUuid' = $this->reportUvid,'activityCount' => count($activityIds),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {$this->failReport( reason: AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);$logger→>info(self::LOG_PREFIX 'Not enough activities, skipped', I'automatedReportUvid' => Sthis->reportUvid,'activityCount' => count(SactivityIds),1);PecurtldWindsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)j Support Daily • in 3h 3 mA• RequestGenerateAskJiminnyReportJobTest v100% [8Tue 14 Apr 11:57:25= custom.log= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]C AskJiminnyReportActivityService.phpRequestGenerateaskJiminnykeportJoblest.phpA console [PROD]A console (EU]Al console [STAGING]X2 01 ^class AskJiminnyReportActivityService39626364private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter: :KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function -_construct(private readonly ActivitySearch SactivitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loccerinuertace "Lodder) (...3* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDs*/pubuic tunccion getAcuivity.asrorsavedsearchcsearch ssaveosearch.user nuser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria::createFromRequest(array_merge($requestParams, ['Limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' →> 11),$user->getTimezone()$filterSet = $this->activitySearch->get0nDemandPageFilterSet($criteria, Suser);eaccade S7aCommand *1$activityIds = $this->elasticRepository->onDemandSearchIdsdfly($user, $criteria, $filterSet);$this->logger→>info('[AsKLiminnxReRQrt] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getId(),'user_id'=> $user->getId(),'activity_count' => count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array(...}winasun leams55:0924 charsuir-o( 4 spaces...
|
NULL
|
-3152088337985815209
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php© InboxEmailBatchRepositoryInboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> D AjReportsD AvatarcalendarD ConferenceD Crm>MImport> MInternallv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© AutomatedReportsCommand.phpJiminnybeouecommana.ong© AddLayoutEntities.php© AutomatedReportsService.phpCreateHeldActivityEvent.phpUserPilotActivityListener.php© ActivityLogged.phpRequestGenerateAskJiminnyReportJob.php© AutomatedReportsSendCommand.phpC Team.php© AutomatedReportsRepository.php© TrackProviderInstalledEvent.php© CreateActivityLoggedEvent.php© AutomatedReportsCallbackService.phpRequestGeneratekeporJob.onoC AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUniquepublic function handle(1):818283100101102103104105106107108109110111112113114115116Tecurtin$savedSearch = $automatedReport->getSavedSearch;if ($savedSearch === null) {+Logger->warninglselt..Luo_PkErLX'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1):lecuri$prompt = $automatedReport->getAskAnythingPrompt();if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', I'aucomatedkeporcuuld = suhis->reporcuuld,1):recurn,$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService: :MEDIA_TYPE_PDF,$activityIds = $activityService->getActivityIdsForSavedSearchCsavedsearch. ssaveasearch,usel. sul calolr$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', I'automatedReportUuid' = $this->reportUvid,'activityCount' => count($activityIds),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {$this->failReport( reason: AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);$logger→>info(self::LOG_PREFIX 'Not enough activities, skipped', I'automatedReportUvid' => Sthis->reportUvid,'activityCount' => count(SactivityIds),1);PecurtldWindsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)j Support Daily • in 3h 3 mA• RequestGenerateAskJiminnyReportJobTest v100% [8Tue 14 Apr 11:57:25= custom.log= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]C AskJiminnyReportActivityService.phpRequestGenerateaskJiminnykeportJoblest.phpA console [PROD]A console (EU]Al console [STAGING]X2 01 ^class AskJiminnyReportActivityService39626364private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter: :KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function -_construct(private readonly ActivitySearch SactivitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loccerinuertace "Lodder) (...3* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDs*/pubuic tunccion getAcuivity.asrorsavedsearchcsearch ssaveosearch.user nuser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria::createFromRequest(array_merge($requestParams, ['Limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' →> 11),$user->getTimezone()$filterSet = $this->activitySearch->get0nDemandPageFilterSet($criteria, Suser);eaccade S7aCommand *1$activityIds = $this->elasticRepository->onDemandSearchIdsdfly($user, $criteria, $filterSet);$this->logger→>info('[AsKLiminnxReRQrt] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getId(),'user_id'=> $user->getId(),'activity_count' => count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array(...}winasun leams55:0924 charsuir-o( 4 spaces...
|
NULL
|
|
10762
|
212
|
42
|
2026-04-14T08:57:28.491358+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157048491_m1.jpg...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityService.php
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-1920847021272450725
|
-5390502312724452628
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
10763
|
213
|
51
|
2026-04-14T08:57:28.503053+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157048503_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php© InboxEmailBatchRepositoryInboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> D AjReportsD AvatarcalendarD ConferenceD Crm>MImport> MInternallv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© AutomatedReportsCommand.phpJiminnybeouecommana.ong© AddLayoutEntities.php© AutomatedReportsService.phpCreateHeldActivityEvent.phpUserPilotActivityListener.php© ActivityLogged.phpRequestGenerateAskJiminnyReportJob.php© AutomatedReportsSendCommand.phpC Team.php© AutomatedReportsRepository.php© TrackProviderInstalledEvent.php© CreateActivityLoggedEvent.php© AutomatedReportsCallbackService.phpRequestGeneratekeporJob.onoC AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUniquepublic function handle(1):818283100101102103104105106107108109110111112113114115116Tecurtin$savedSearch = $automatedReport->getSavedSearch;if ($savedSearch === null) {+Logger->warninglselt..Luo_PkErLX'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1):lecuri$prompt = $automatedReport->getAskAnythingPrompt();if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', I'aucomatedkeporcuuld = suhis->reporcuuld,1):recurn,$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService: :MEDIA_TYPE_PDF,$activityIds = $activityService->getActivityIdsForSavedSearchCsavedsearch. ssaveasearch,usel. sul calolr$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', I'automatedReportUuid' = $this->reportUvid,'activityCount' => count($activityIds),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {$this->failReport( reason: AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);$logger→>info(self::LOG_PREFIX 'Not enough activities, skipped', I'automatedReportUvid' => Sthis->reportUvid,'activityCount' => count(SactivityIds),1);PecurtldWindsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)j Support Daily • in 3h 3 mA• RequestGenerateAskJiminnyReportJobTest v100% [8Tue 14 Apr 11:57:28= custom.log= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]C AskJiminnyReportActivityService.phpRequestGenerateaskJiminnykeportJoblest.phpA console [PROD]A console (EU]Al console [STAGING]X2 01 ^class AskJiminnyReportActivityService39626364private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function -_construct(private readonly ActivitySearch SactivitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loccerinuertace "Lodder) (...3* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDs*/pubuic tunccion getAcuivity.asrorsavedsearchcSearch $savedSearch,user nuser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);griteria = Criteria::createFromRequest(array_merge($requestParams, ['Limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' →> 11),$user->getTimezone()$filterSet = $this->activitySearch->get0nDemandPageFilterSet($criteria, Suser);$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AskLimionxReport] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getId(),'user_id'=> $user->getId(),'activity_count' => count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array(...}W Windsur leams55:50uir-of4 spaces...
|
NULL
|
-4738547815709902594
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php© InboxEmailBatchRepositoryInboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> D AjReportsD AvatarcalendarD ConferenceD Crm>MImport> MInternallv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© AutomatedReportsCommand.phpJiminnybeouecommana.ong© AddLayoutEntities.php© AutomatedReportsService.phpCreateHeldActivityEvent.phpUserPilotActivityListener.php© ActivityLogged.phpRequestGenerateAskJiminnyReportJob.php© AutomatedReportsSendCommand.phpC Team.php© AutomatedReportsRepository.php© TrackProviderInstalledEvent.php© CreateActivityLoggedEvent.php© AutomatedReportsCallbackService.phpRequestGeneratekeporJob.onoC AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUniquepublic function handle(1):818283100101102103104105106107108109110111112113114115116Tecurtin$savedSearch = $automatedReport->getSavedSearch;if ($savedSearch === null) {+Logger->warninglselt..Luo_PkErLX'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1):lecuri$prompt = $automatedReport->getAskAnythingPrompt();if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', I'aucomatedkeporcuuld = suhis->reporcuuld,1):recurn,$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService: :MEDIA_TYPE_PDF,$activityIds = $activityService->getActivityIdsForSavedSearchCsavedsearch. ssaveasearch,usel. sul calolr$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', I'automatedReportUuid' = $this->reportUvid,'activityCount' => count($activityIds),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {$this->failReport( reason: AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);$logger→>info(self::LOG_PREFIX 'Not enough activities, skipped', I'automatedReportUvid' => Sthis->reportUvid,'activityCount' => count(SactivityIds),1);PecurtldWindsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)j Support Daily • in 3h 3 mA• RequestGenerateAskJiminnyReportJobTest v100% [8Tue 14 Apr 11:57:28= custom.log= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]C AskJiminnyReportActivityService.phpRequestGenerateaskJiminnykeportJoblest.phpA console [PROD]A console (EU]Al console [STAGING]X2 01 ^class AskJiminnyReportActivityService39626364private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function -_construct(private readonly ActivitySearch SactivitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loccerinuertace "Lodder) (...3* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDs*/pubuic tunccion getAcuivity.asrorsavedsearchcSearch $savedSearch,user nuser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);griteria = Criteria::createFromRequest(array_merge($requestParams, ['Limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' →> 11),$user->getTimezone()$filterSet = $this->activitySearch->get0nDemandPageFilterSet($criteria, Suser);$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AskLimionxReport] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getId(),'user_id'=> $user->getId(),'activity_count' => count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array(...}W Windsur leams55:50uir-of4 spaces...
|
10761
|
|
10764
|
212
|
43
|
2026-04-14T08:57:30.545559+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157050545_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 3 m100% CTue 14 Apr 11:57:30ec2-user@ip-10-30-93-249:~DOCKER• 8812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453eбc4054", "teamId" :1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id" :"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"})root@73b64f5d54a3:/home/jiminny#l...
|
NULL
|
-9168728297445745419
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp(aolSupport Daily - in 3 h 3 m100% CTue 14 Apr 11:57:30ec2-user@ip-10-30-93-249:~DOCKER• 8812026-04-1407:48:51]DEV (-zsh)882APP (-zsh)staging.INF0:[automated-reports]Started83ec2-user@ip-10-30-...-zsh-zsh86-zshO 87* Unable to acce...{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}O 88[2026-04-1407:48:51]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}{"correlation_[2026-04-1407:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:517c-8954-5fb1ecfded81"}staging. INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging. INFO:[automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId": 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51]staging.INF0:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" : "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it S(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INF0: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"'}[2026-04-14 08:41:03]staging.INFO:[automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true} {"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Found 3 dailyreports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e[2026-04-14 08:41:031staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId" : 1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453eбc4054", "teamId" :1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f""})[2026-04-14 08:41:04]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports]Completed{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id" :"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"})root@73b64f5d54a3:/home/jiminny#l...
|
10762
|
|
10765
|
213
|
52
|
2026-04-14T08:57:30.563053+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157050563_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php© InboxEmailBatchRepositoryInboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> D AjReportsD AvatarcalendarD ConferenceD Crm>MImport> MInternallv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© AutomatedReportsCommand.phpJiminnybeouecommana.ong© AddLayoutEntities.php© AutomatedReportsService.phpCreateHeldActivityEvent.phpUserPilotActivityListener.php© ActivityLogged.phpRequestGenerateAskJiminnyReportJob.php© AutomatedReportsSendCommand.phpC Team.php© AutomatedReportsRepository.php© TrackProviderInstalledEvent.php© CreateActivityLoggedEvent.php© AutomatedReportsCallbackService.phpRequestGeneratekeporJob.onoC AutomatedReportResult.php(e) AutomatedRenort.ohrclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUniquepublic function handle(1):818283100101102103104105106107108109110111112113114115116Tecurtin$savedSearch = $automatedReport->getSavedSearch;if ($savedSearch === null) {+Logger->warninglselt..Luo_PkErLX'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1):lecuri$prompt = $automatedReport->getAskAnythingPrompt();if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', I'aucomatedkeporcuuld = suhis->reporcuuld,1):recurn,$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService: :MEDIA_TYPE_PDF,$activityIds = $activityService->getActivityIdsForSavedSearchCsavedsearch. ssaveasearch,usel. sulcalol$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', I'automatedReportUuid' = $this->reportUvid,'activityCount' => count($activityIds),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {$this->failReport( reason: AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);$logger→>info(self::LOG_PREFIX 'Not enough activities, skipped', I'automatedReportUvid' => Sthis->reportUvid,'activityCount' => count(SactivityIds),1);PecurtldWindsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)Support Daily • in 3 h 3 mA• RequestGenerateAskJiminnyReportJobTest v100% [2Tue 14 Apr 11:57:30= custom.log= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]C AskJiminnyReportActivityService.phpRequestGenerateaskJiminnykeportJoblest.phpA console [PROD]A console (EU]Al console [STAGING]X2 01 ^class AskJiminnyReportActivityService39626364private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function -_construct(private readonly ActivitySearch SactivitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loccerinuertace "Lodder) (...3* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDs*/pubuic tunccion getAcuivity.asrorsavedsearchcSearch $savedSearch,user nuser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria: :createFromRequest(array_merge($requestParams, ['Limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' →> 11),$user->getTimezone()$filterSet = $this->activitySearch->get0nDemandPageFilterSet(Scriteria, Suser);$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AskLimionxReport] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getId(),'user_id'=> $user->getId(),'activity_count' => count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array(...}W Windsurt leams 50:10uir-of4 spaces...
|
NULL
|
-2900423173037074263
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php© InboxEmailBatchRepositoryInboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> D AjReportsD AvatarcalendarD ConferenceD Crm>MImport> MInternallv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© AutomatedReportsCommand.phpJiminnybeouecommana.ong© AddLayoutEntities.php© AutomatedReportsService.phpCreateHeldActivityEvent.phpUserPilotActivityListener.php© ActivityLogged.phpRequestGenerateAskJiminnyReportJob.php© AutomatedReportsSendCommand.phpC Team.php© AutomatedReportsRepository.php© TrackProviderInstalledEvent.php© CreateActivityLoggedEvent.php© AutomatedReportsCallbackService.phpRequestGeneratekeporJob.onoC AutomatedReportResult.php(e) AutomatedRenort.ohrclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUniquepublic function handle(1):818283100101102103104105106107108109110111112113114115116Tecurtin$savedSearch = $automatedReport->getSavedSearch;if ($savedSearch === null) {+Logger->warninglselt..Luo_PkErLX'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1):lecuri$prompt = $automatedReport->getAskAnythingPrompt();if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', I'aucomatedkeporcuuld = suhis->reporcuuld,1):recurn,$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService: :MEDIA_TYPE_PDF,$activityIds = $activityService->getActivityIdsForSavedSearchCsavedsearch. ssaveasearch,usel. sulcalol$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', I'automatedReportUuid' = $this->reportUvid,'activityCount' => count($activityIds),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {$this->failReport( reason: AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);$logger→>info(self::LOG_PREFIX 'Not enough activities, skipped', I'automatedReportUvid' => Sthis->reportUvid,'activityCount' => count(SactivityIds),1);PecurtldWindsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)Support Daily • in 3 h 3 mA• RequestGenerateAskJiminnyReportJobTest v100% [2Tue 14 Apr 11:57:30= custom.log= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]C AskJiminnyReportActivityService.phpRequestGenerateaskJiminnykeportJoblest.phpA console [PROD]A console (EU]Al console [STAGING]X2 01 ^class AskJiminnyReportActivityService39626364private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function -_construct(private readonly ActivitySearch SactivitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loccerinuertace "Lodder) (...3* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDs*/pubuic tunccion getAcuivity.asrorsavedsearchcSearch $savedSearch,user nuser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria: :createFromRequest(array_merge($requestParams, ['Limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' →> 11),$user->getTimezone()$filterSet = $this->activitySearch->get0nDemandPageFilterSet(Scriteria, Suser);$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AskLimionxReport] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getId(),'user_id'=> $user->getId(),'activity_count' => count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array(...}W Windsurt leams 50:10uir-of4 spaces...
|
NULL
|
|
10766
|
213
|
53
|
2026-04-14T08:57:33.047187+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157053047_m2.jpg...
|
Firefox
|
CloudWatch | us-east-2 — Work
|
1
|
us-east-2.console.aws.amazon.com/cloudwatch/home?r us-east-2.console.aws.amazon.com/cloudwatch/home?region=us-east-2#logsV2:logs-insights$3FqueryDetail$3D~(end~0~start~-3600~timeType~'RELATIVE~tz~'UTC~unit~'seconds~editorString~'fields*20*40timestamp*2c*20*40message*2c*20*40logStream*2c*20*40log*0a*7c*20filter*20*40message*20like*20*22*5bAskJiminnyReport*3aGenerate*5d*22*20*0a*7c*20filter*20*40message*20not*20like*20*2fAnalytic*2f*20*7c*20filter*20*40message*20not*20like*20*2fTranscript*2f*0a*7c*20filter*20*40message*20not*20like*20*2fWebhook*2f*20*7c*20filter*20*40message*20not*20like*20*2fMeetingBot*2f*20*0a*7c*20limit*2010000~queryId~'0551e814-f51a-4339-8372-80d7ba4cef27~source~(~'*2a)~lang~'CWLI~logClass~'STANDARD~accountIDs~(~'All)~queryBy~'allLogGroups)...
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
JY-20543 add AJ reports User pilot tracking by Lak JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Console Home | Console Home | us-east-2
Console Home | Console Home | us-east-2
SecurityGroup | EC2 | us-east-2
SecurityGroup | EC2 | us-east-2
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app
SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app
Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet
Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet
Jiminny
Jiminny
Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf
Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf
Service-Desk - Queues - Platform team - Service space - Jira
Service-Desk - Queues - Platform team - Service space - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
CloudWatch | us-east-2
CloudWatch | us-east-2
New Tab
New Tab
CloudWatch | us-east-2
CloudWatch | us-east-2
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AWS Console Home
Skip to Main Content
Skip to Main Content
Amazon Q
Services
Search
Ask Amazon Q
[Option+S]
CloudShell
Notifications (none available)
Help & support
Settings
United States (Ohio)
United States (Ohio)
STAGE
Account ID: 4387-4037-0364
STAGE
EC2 EC2
EC2
Elastic Container Service Elastic Container Service
Elastic Container Service
S3 S3
S3
CodeDeploy CodeDeploy
CodeDeploy
CloudWatch CloudWatch
CloudWatch
ElastiCache ElastiCache
ElastiCache
Aurora and RDS Aurora and RDS
Aurora and RDS
Amazon OpenSearch Service Amazon OpenSearch Service
Amazon OpenSearch Service
CloudFront CloudFront
CloudFront
MediaLive MediaLive
MediaLive
Open side navigation
CloudWatch
CloudWatch
Logs Insights
Logs Insights
Query definition
Query definition
Info : Query definition
5m (5 Minutes)
30m (30 Minutes)
1h (1 Hour)
3h (3 Hours)
12h (12 Hours)
Custom
Custom
Compare (Off)
Compare
(
Off
)
Time zone UTC timezone
UTC timezone
Start tailing with selected log group (opens in a new tab)
Start tailing
Query scope
Query scope All log groups
All log groups
All log groups
Log class
Log class STANDARD
STANDARD
Account(s)
Account(s) Change Account(s)
Change Account(s)
Remove All accounts
Undo
Redo
Logs Insights QL
Query generator
Query generator
Fields
Saved and sample queries
Query commands
Run query
Cancel
Save
History
Completed. Query executed for
147 log groups.
View log groups used in query
Logs (10)
Logs
(
10
)
Patterns (5)
Patterns
(
5
)
Visualization
Visualization
Logs (10)
Logs (10)
Summarize results
Summarize results
Investigate
Investigate
Share results
Share results
Export results
Export results
Add to dashboard
Showing 10 of 10 records matched
107,195 records (265.0 MB) scanned in 3.2s @ 33,561 records/s (83.0 MB/s)
Hide histogram...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":4,"bounds":{"left":0.00234375,"top":0.045138888,"width":0.0890625,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira","depth":4,"bounds":{"left":0.0,"top":0.08263889,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira","depth":5,"bounds":{"left":0.015625,"top":0.09236111,"width":0.11796875,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":4,"bounds":{"left":0.0,"top":0.11111111,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":5,"bounds":{"left":0.015625,"top":0.12083333,"width":0.18710938,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Configure SSH access to multiple environment - Engineering - Confluence","depth":4,"bounds":{"left":0.0,"top":0.13958333,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Configure SSH access to multiple environment - Engineering - Confluence","depth":5,"bounds":{"left":0.015625,"top":0.14930555,"width":0.1515625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Console Home | Console Home | us-east-2","depth":4,"bounds":{"left":0.0,"top":0.16805555,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Console Home | Console Home | us-east-2","depth":5,"bounds":{"left":0.015625,"top":0.17777778,"width":0.08671875,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"SecurityGroup | EC2 | us-east-2","depth":4,"bounds":{"left":0.0,"top":0.19652778,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"SecurityGroup | EC2 | us-east-2","depth":5,"bounds":{"left":0.015625,"top":0.20625,"width":0.06484375,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":4,"bounds":{"left":0.0,"top":0.225,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":5,"bounds":{"left":0.015625,"top":0.23472223,"width":0.18710938,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app","depth":4,"bounds":{"left":0.0,"top":0.2534722,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app","depth":5,"bounds":{"left":0.015625,"top":0.26319444,"width":0.23476562,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet","depth":4,"bounds":{"left":0.0,"top":0.28194445,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet","depth":5,"bounds":{"left":0.015625,"top":0.29166666,"width":0.1984375,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Jiminny","depth":4,"bounds":{"left":0.0,"top":0.31041667,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Jiminny","depth":5,"bounds":{"left":0.015625,"top":0.3201389,"width":0.015625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf","depth":4,"bounds":{"left":0.0,"top":0.33888888,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf","depth":5,"bounds":{"left":0.015625,"top":0.34861112,"width":0.1640625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Service-Desk - Queues - Platform team - Service space - Jira","depth":4,"bounds":{"left":0.0,"top":0.3673611,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Service-Desk - Queues - Platform team - Service space - Jira","depth":5,"bounds":{"left":0.015625,"top":0.37708333,"width":0.12617187,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":4,"bounds":{"left":0.0,"top":0.39583334,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":5,"bounds":{"left":0.015625,"top":0.40555555,"width":0.18710938,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Configure SSH access to multiple environment - Engineering - Confluence","depth":4,"bounds":{"left":0.0,"top":0.42430556,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Configure SSH access to multiple environment - Engineering - Confluence","depth":5,"bounds":{"left":0.015625,"top":0.4340278,"width":0.1515625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"CloudWatch | us-east-2","depth":4,"bounds":{"left":0.0,"top":0.45277777,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"CloudWatch | us-east-2","depth":5,"bounds":{"left":0.015625,"top":0.4625,"width":0.0484375,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"New Tab","depth":4,"bounds":{"left":0.0,"top":0.48125,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"New Tab","depth":5,"bounds":{"left":0.015625,"top":0.49097222,"width":0.017578125,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"CloudWatch | us-east-2","depth":4,"bounds":{"left":0.0,"top":0.50972223,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true},{"role":"AXStaticText","text":"CloudWatch | us-east-2","depth":5,"bounds":{"left":0.015625,"top":0.51944447,"width":0.0484375,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Close tab","depth":5,"bounds":{"left":0.07890625,"top":0.5159722,"width":0.009375,"height":0.016666668},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"New Tab","depth":4,"bounds":{"left":0.003125,"top":0.5395833,"width":0.08710937,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Customize sidebar","depth":6,"bounds":{"left":0.003125,"top":0.97430557,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Open Google Gemini (⌃X)","depth":6,"bounds":{"left":0.01640625,"top":0.97430557,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Tabs from other devices","depth":6,"bounds":{"left":0.029296875,"top":0.97430557,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Open history (⇧⌘H)","depth":6,"bounds":{"left":0.0421875,"top":0.97430557,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Open bookmarks (⌘B)","depth":6,"bounds":{"left":0.05546875,"top":0.97430557,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXLink","text":"AWS Console Home","depth":13,"bounds":{"left":0.09375,"top":0.047916666,"width":0.025390625,"height":0.033333335},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXLink","text":"Skip to Main Content","depth":13,"bounds":{"left":0.09335937,"top":0.047222223,"width":0.0015625,"height":0.0013888889},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Skip to Main Content","depth":14,"bounds":{"left":0.09414063,"top":0.047916666,"width":0.01953125,"height":0.045138888},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Amazon Q","depth":14,"bounds":{"left":0.11953125,"top":0.047916666,"width":0.01953125,"height":0.033333335},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Services","depth":13,"bounds":{"left":0.1390625,"top":0.047916666,"width":0.01953125,"height":0.033333335},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXComboBox","text":"Search","depth":16,"bounds":{"left":0.15859374,"top":0.054166667,"width":0.2109375,"height":0.020833334},"role_description":"combo box","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Ask Amazon Q","depth":15,"bounds":{"left":0.35390624,"top":0.05625,"width":0.01171875,"height":0.016666668},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"[Option+S]","depth":16,"bounds":{"left":0.32851562,"top":0.058333334,"width":0.02734375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"CloudShell","depth":14,"bounds":{"left":0.78046876,"top":0.047916666,"width":0.01875,"height":0.033333335},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Notifications (none available)","depth":15,"bounds":{"left":0.7992188,"top":0.050694443,"width":0.01953125,"height":0.027777778},"help_text":"Notifications","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Help & support","depth":15,"bounds":{"left":0.81875,"top":0.047916666,"width":0.01953125,"height":0.033333335},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Settings","depth":15,"bounds":{"left":0.8382813,"top":0.047916666,"width":0.01953125,"height":0.033333335},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXComboBox","text":"United States (Ohio)","depth":15,"bounds":{"left":0.8578125,"top":0.047916666,"width":0.06328125,"height":0.033333335},"value":"United States (Ohio)","help_text":"United States (Ohio)","role_description":"combo box","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"United States (Ohio)","depth":17,"bounds":{"left":0.86445314,"top":0.059722222,"width":0.04375,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"STAGE","depth":15,"bounds":{"left":0.92109376,"top":0.047916666,"width":0.07890624,"height":0.033333335},"help_text":"Staging_View_Only @ jmny","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Account ID: 4387-4037-0364","depth":19,"bounds":{"left":0.92460936,"top":0.05,"width":0.06367187,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"STAGE","depth":18,"bounds":{"left":0.9777344,"top":0.065972224,"width":0.0140625,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"EC2 EC2","depth":16,"bounds":{"left":0.096875,"top":0.083333336,"width":0.023828125,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"EC2","depth":18,"bounds":{"left":0.109375,"top":0.088194445,"width":0.008203125,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Elastic Container Service Elastic Container Service","depth":16,"bounds":{"left":0.12070312,"top":0.083333336,"width":0.06757812,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Elastic Container Service","depth":18,"bounds":{"left":0.13320312,"top":0.088194445,"width":0.051953126,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"S3 S3","depth":16,"bounds":{"left":0.18828125,"top":0.083333336,"width":0.02109375,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"S3","depth":18,"bounds":{"left":0.20078126,"top":0.088194445,"width":0.00546875,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"CodeDeploy CodeDeploy","depth":16,"bounds":{"left":0.209375,"top":0.083333336,"width":0.04140625,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"CodeDeploy","depth":18,"bounds":{"left":0.221875,"top":0.088194445,"width":0.02578125,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"CloudWatch CloudWatch","depth":16,"bounds":{"left":0.25078124,"top":0.083333336,"width":0.04140625,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"CloudWatch","depth":18,"bounds":{"left":0.26328126,"top":0.088194445,"width":0.02578125,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"ElastiCache ElastiCache","depth":16,"bounds":{"left":0.2921875,"top":0.083333336,"width":0.03984375,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"ElastiCache","depth":18,"bounds":{"left":0.3046875,"top":0.088194445,"width":0.02421875,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Aurora and RDS Aurora and RDS","depth":16,"bounds":{"left":0.33203125,"top":0.083333336,"width":0.048828125,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Aurora and RDS","depth":18,"bounds":{"left":0.34453124,"top":0.088194445,"width":0.033203125,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Amazon OpenSearch Service Amazon OpenSearch Service","depth":16,"bounds":{"left":0.38085938,"top":0.083333336,"width":0.07421875,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Amazon OpenSearch Service","depth":18,"bounds":{"left":0.39335936,"top":0.088194445,"width":0.0609375,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"CloudFront CloudFront","depth":16,"bounds":{"left":0.45507812,"top":0.083333336,"width":0.039453126,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"CloudFront","depth":18,"bounds":{"left":0.4675781,"top":0.088194445,"width":0.023828125,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"MediaLive MediaLive","depth":16,"bounds":{"left":0.49453124,"top":0.083333336,"width":0.037109375,"height":0.019444445},"role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"MediaLive","depth":18,"bounds":{"left":0.50703126,"top":0.088194445,"width":0.021484375,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXMenuButton","text":"Open side navigation","depth":13,"bounds":{"left":0.1,"top":0.108333334,"width":0.01171875,"height":0.020833334},"help_text":"","role_description":"menu button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"CloudWatch","depth":14,"bounds":{"left":0.11640625,"top":0.11111111,"width":0.031640626,"height":0.015277778},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"CloudWatch","depth":16,"bounds":{"left":0.1171875,"top":0.1125,"width":0.030078124,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Logs Insights","depth":14,"bounds":{"left":0.16054687,"top":0.11180556,"width":0.03359375,"height":0.013888889},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Logs Insights","depth":16,"bounds":{"left":0.16054687,"top":0.1125,"width":0.03359375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXHeading","text":"Query definition","depth":26,"bounds":{"left":0.1125,"top":0.14513889,"width":0.059375,"height":0.017361112},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXButton","text":"Query definition","depth":28,"bounds":{"left":0.10234375,"top":0.14513889,"width":0.06953125,"height":0.017361112},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":true},{"role":"AXButton","text":"Info : Query definition","depth":27,"bounds":{"left":0.175,"top":0.15069444,"width":0.008984375,"height":0.010416667},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"5m (5 Minutes)","depth":27,"bounds":{"left":0.66445315,"top":0.14652778,"width":0.014453125,"height":0.013888889},"help_text":"5 Minutes","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"30m (30 Minutes)","depth":27,"bounds":{"left":0.68789065,"top":0.14652778,"width":0.017578125,"height":0.013888889},"help_text":"30 Minutes","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"1h (1 Hour)","depth":27,"bounds":{"left":0.7140625,"top":0.14652778,"width":0.012890625,"height":0.013888889},"help_text":"1 Hour","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"3h (3 Hours)","depth":27,"bounds":{"left":0.7359375,"top":0.14652778,"width":0.012890625,"height":0.013888889},"help_text":"3 Hours","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"12h (12 Hours)","depth":27,"bounds":{"left":0.7578125,"top":0.14652778,"width":0.015625,"height":0.013888889},"help_text":"12 Hours","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Custom","depth":27,"bounds":{"left":0.7824219,"top":0.14652778,"width":0.028515626,"height":0.013888889},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Custom","depth":29,"bounds":{"left":0.7824219,"top":0.14722222,"width":0.019140625,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXCheckBox","text":"Compare (Off)","depth":26,"bounds":{"left":0.81875,"top":0.14305556,"width":0.0546875,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Compare","depth":27,"bounds":{"left":0.82734376,"top":0.14791666,"width":0.023046875,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"(","depth":27,"bounds":{"left":0.8503906,"top":0.14791666,"width":0.003515625,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Off","depth":27,"bounds":{"left":0.8539063,"top":0.14791666,"width":0.008984375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":")","depth":27,"bounds":{"left":0.8628906,"top":0.14791666,"width":0.001953125,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Time zone UTC timezone","depth":26,"bounds":{"left":0.8761719,"top":0.14305556,"width":0.054296874,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"UTC timezone","depth":28,"bounds":{"left":0.88125,"top":0.14791666,"width":0.034765624,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Start tailing with selected log group (opens in a new tab)","depth":26,"bounds":{"left":0.9351562,"top":0.14305556,"width":0.056640625,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Start tailing","depth":27,"bounds":{"left":0.9515625,"top":0.14791666,"width":0.031640626,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Query scope","depth":28,"bounds":{"left":0.10234375,"top":0.18402778,"width":0.03203125,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Query scope All log groups","depth":27,"bounds":{"left":0.10234375,"top":0.20416667,"width":0.078125,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"All log groups","depth":29,"bounds":{"left":0.107421875,"top":0.20902778,"width":0.034375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXTextField","text":"All log groups","depth":26,"bounds":{"left":0.1875,"top":0.20416667,"width":0.68242186,"height":0.022222223},"help_text":"","role_description":"search text field","subrole":"AXSearchField","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Log class","depth":28,"bounds":{"left":0.8730469,"top":0.18402778,"width":0.0234375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Log class STANDARD","depth":27,"bounds":{"left":0.8730469,"top":0.20416667,"width":0.0484375,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"STANDARD","depth":29,"bounds":{"left":0.878125,"top":0.20902778,"width":0.027734375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Account(s)","depth":28,"bounds":{"left":0.92460936,"top":0.18402778,"width":0.026953125,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Account(s) Change Account(s)","depth":27,"bounds":{"left":0.92460936,"top":0.20416667,"width":0.0625,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Change Account(s)","depth":29,"bounds":{"left":0.9296875,"top":0.20902778,"width":0.04453125,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Remove All accounts","depth":29,"bounds":{"left":0.96132815,"top":0.2361111,"width":0.01015625,"height":0.015277778},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Undo","depth":28,"bounds":{"left":0.9332031,"top":0.37361112,"width":0.0109375,"height":0.013888889},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Redo","depth":28,"bounds":{"left":0.9472656,"top":0.37361112,"width":0.0109375,"height":0.013888889},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXMenuButton","text":"Logs Insights QL","depth":29,"bounds":{"left":0.10898437,"top":0.4027778,"width":0.06796875,"height":0.022222223},"help_text":"","role_description":"menu button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Query generator","depth":26,"bounds":{"left":0.18007812,"top":0.4,"width":0.061328124,"height":0.028472222},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Query generator","depth":28,"bounds":{"left":0.19414063,"top":0.40694445,"width":0.042578124,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Fields","depth":28,"bounds":{"left":0.25390625,"top":0.40694445,"width":0.015234375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Saved and sample queries","depth":28,"bounds":{"left":0.28632814,"top":0.40694445,"width":0.06640625,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Query commands","depth":28,"bounds":{"left":0.36992186,"top":0.40694445,"width":0.0453125,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Run query","depth":27,"bounds":{"left":0.10234375,"top":0.4375,"width":0.044140626,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Cancel","depth":27,"bounds":{"left":0.14960937,"top":0.4375,"width":0.034375,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Save","depth":27,"bounds":{"left":0.18710938,"top":0.4375,"width":0.02890625,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"History","depth":27,"bounds":{"left":0.29140624,"top":0.4375,"width":0.036328126,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Completed. Query executed for","depth":28,"bounds":{"left":0.11015625,"top":0.46597221,"width":0.07773437,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"147 log groups.","depth":28,"bounds":{"left":0.18945312,"top":0.46597221,"width":0.038671874,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"View log groups used in query","depth":28,"bounds":{"left":0.2296875,"top":0.46597221,"width":0.00625,"height":0.0125},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"Logs (10)","depth":25,"bounds":{"left":0.09765625,"top":0.49722221,"width":0.03671875,"height":0.030555556},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true},{"role":"AXStaticText","text":"Logs","depth":27,"bounds":{"left":0.10234375,"top":0.50555557,"width":0.013671875,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"(","depth":27,"bounds":{"left":0.11757813,"top":0.50555557,"width":0.00234375,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"10","depth":27,"bounds":{"left":0.11992188,"top":0.50555557,"width":0.007421875,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":")","depth":27,"bounds":{"left":0.12734374,"top":0.50555557,"width":0.001953125,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Patterns (5)","depth":25,"bounds":{"left":0.14101562,"top":0.49722221,"width":0.04453125,"height":0.030555556},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Patterns","depth":27,"bounds":{"left":0.14570312,"top":0.50555557,"width":0.025,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"(","depth":27,"bounds":{"left":0.17070313,"top":0.50555557,"width":0.00390625,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"5","depth":27,"bounds":{"left":0.17460938,"top":0.50555557,"width":0.003515625,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":")","depth":27,"bounds":{"left":0.178125,"top":0.50555557,"width":0.00234375,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Visualization","depth":25,"bounds":{"left":0.1921875,"top":0.49722221,"width":0.04765625,"height":0.030555556},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Visualization","depth":27,"bounds":{"left":0.196875,"top":0.50555557,"width":0.037890624,"height":0.013888889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXHeading","text":"Logs (10)","depth":26,"bounds":{"left":0.10195313,"top":0.5361111,"width":0.0328125,"height":0.017361112},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Logs (10)","depth":27,"bounds":{"left":0.10195313,"top":0.5361111,"width":0.0328125,"height":0.017361112},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Summarize results","depth":26,"bounds":{"left":0.60234374,"top":0.5326389,"width":0.07304688,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Summarize results","depth":27,"bounds":{"left":0.61875,"top":0.5375,"width":0.048046876,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXMenuButton","text":"Investigate","depth":28,"bounds":{"left":0.6785156,"top":0.5326389,"width":0.062109374,"height":0.022222223},"help_text":"","role_description":"menu button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Investigate","depth":29,"bounds":{"left":0.69570315,"top":0.5375,"width":0.028515626,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Share results","depth":26,"bounds":{"left":0.74375,"top":0.5326389,"width":0.058984376,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Share results","depth":27,"bounds":{"left":0.7601563,"top":0.5375,"width":0.033984374,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXMenuButton","text":"Export results","depth":28,"bounds":{"left":0.8058594,"top":0.5326389,"width":0.0609375,"height":0.022222223},"help_text":"","role_description":"menu button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Export results","depth":29,"bounds":{"left":0.8144531,"top":0.5375,"width":0.0359375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Add to dashboard","depth":26,"bounds":{"left":0.86992186,"top":0.5326389,"width":0.06367187,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Showing 10 of 10 records matched","depth":29,"bounds":{"left":0.48125,"top":0.5673611,"width":0.09492187,"height":0.014583333},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"107,195 records (265.0 MB) scanned in 3.2s @ 33,561 records/s (83.0 MB/s)","depth":29,"bounds":{"left":0.43515626,"top":0.58263886,"width":0.1875,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Hide histogram","depth":26,"bounds":{"left":0.959375,"top":0.5659722,"width":0.03671875,"height":0.029861111},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false}]...
|
-6541611818737587627
|
3692197088160510086
|
visual_change
|
accessibility
|
NULL
|
JY-20543 add AJ reports User pilot tracking by Lak JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Console Home | Console Home | us-east-2
Console Home | Console Home | us-east-2
SecurityGroup | EC2 | us-east-2
SecurityGroup | EC2 | us-east-2
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app
SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app
Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet
Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet
Jiminny
Jiminny
Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf
Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf
Service-Desk - Queues - Platform team - Service space - Jira
Service-Desk - Queues - Platform team - Service space - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
CloudWatch | us-east-2
CloudWatch | us-east-2
New Tab
New Tab
CloudWatch | us-east-2
CloudWatch | us-east-2
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AWS Console Home
Skip to Main Content
Skip to Main Content
Amazon Q
Services
Search
Ask Amazon Q
[Option+S]
CloudShell
Notifications (none available)
Help & support
Settings
United States (Ohio)
United States (Ohio)
STAGE
Account ID: 4387-4037-0364
STAGE
EC2 EC2
EC2
Elastic Container Service Elastic Container Service
Elastic Container Service
S3 S3
S3
CodeDeploy CodeDeploy
CodeDeploy
CloudWatch CloudWatch
CloudWatch
ElastiCache ElastiCache
ElastiCache
Aurora and RDS Aurora and RDS
Aurora and RDS
Amazon OpenSearch Service Amazon OpenSearch Service
Amazon OpenSearch Service
CloudFront CloudFront
CloudFront
MediaLive MediaLive
MediaLive
Open side navigation
CloudWatch
CloudWatch
Logs Insights
Logs Insights
Query definition
Query definition
Info : Query definition
5m (5 Minutes)
30m (30 Minutes)
1h (1 Hour)
3h (3 Hours)
12h (12 Hours)
Custom
Custom
Compare (Off)
Compare
(
Off
)
Time zone UTC timezone
UTC timezone
Start tailing with selected log group (opens in a new tab)
Start tailing
Query scope
Query scope All log groups
All log groups
All log groups
Log class
Log class STANDARD
STANDARD
Account(s)
Account(s) Change Account(s)
Change Account(s)
Remove All accounts
Undo
Redo
Logs Insights QL
Query generator
Query generator
Fields
Saved and sample queries
Query commands
Run query
Cancel
Save
History
Completed. Query executed for
147 log groups.
View log groups used in query
Logs (10)
Logs
(
10
)
Patterns (5)
Patterns
(
5
)
Visualization
Visualization
Logs (10)
Logs (10)
Summarize results
Summarize results
Investigate
Investigate
Share results
Share results
Export results
Export results
Add to dashboard
Showing 10 of 10 records matched
107,195 records (265.0 MB) scanned in 3.2s @ 33,561 records/s (83.0 MB/s)
Hide histogram...
|
10765
|
|
10767
|
212
|
44
|
2026-04-14T08:57:45.045499+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157065045_m1.jpg...
|
Slack
|
Aneliya Angelova, Nikolay Yankov, Steliyan Georgie Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev (DM) - Jiminny Inc - Slack...
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
curiosity_lab
engineering
frontend
general
infra-changes
jiminny-bg
platform-tickets
product_launches
random
releases
sofia-office
support
thank-yous
the_people_of_jiminny
Aneliya Angelova
,
Nikolay Yankov
,
Steliyan Georgiev
Steliyan Georgiev
Adelina Petrova
,
Ilian Kyuchukov
,
Steliyan Georgiev
Adelina Petrova
Galya Dimitrova
Vasil Vasilev
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Yankov
Nikolay Yankov
Jira Cloud
Toast
Google Calendar
Messages
Messages
Add canvas
Add canvas
Add and Edit Channel Tabs
Canvas
List
Folder
Jump to date
Nikolay Yankov
Today at 10:32:27 AM
10:32 AM
10 мин минаха, още не идва репорт
Lukas Kovalik
Today at 10:34:10 AM
10:34 AM
не само daily но трябва да се пусне команда
Today at 10:35:08 AM
10:35
php artisan automated-reports
Nikolay Yankov
Today at 10:35:39 AM
10:35 AM
значи не създава веднага по принцип, в някакъв час на деня ли стъздава?
Lukas Kovalik
Today at 10:36:11 AM
10:36 AM
това ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)
Today at 10:36:27 AM
10:36
крон го пуска през нощ
Today at 10:37:19 AM
10:37
така че мануално пусни при тестване
Today at 10:38:26 AM
10:38
ако трябва да тестваме други репорти може да променя команда за тестване да приема параметър за report template и д си пускаме определен когато тестваме
Nikolay Yankov...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"Jiminny Inc","depth":12,"bounds":{"left":0.009722223,"top":0.08777778,"width":0.022222223,"height":0.035555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXRadioButton","text":"Jiminny (Staging)","depth":12,"bounds":{"left":0.009722223,"top":0.14555556,"width":0.022222223,"height":0.035555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"Add workspaces","depth":12,"bounds":{"left":0.009722223,"top":0.20333333,"width":0.022222223,"height":0.035555556},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"Home","depth":14,"bounds":{"left":0.048611112,"top":0.07777778,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXStaticText","text":"Home","depth":16,"bounds":{"left":0.05625,"top":0.13,"width":0.020833334,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"DMs","depth":14,"bounds":{"left":0.048611112,"top":0.15333334,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"DMs","depth":16,"bounds":{"left":0.058333334,"top":0.20555556,"width":0.016666668,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"Activity","depth":14,"bounds":{"left":0.048611112,"top":0.22888888,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Activity","depth":16,"bounds":{"left":0.05277778,"top":0.28111112,"width":0.027083334,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"Files","depth":14,"bounds":{"left":0.048611112,"top":0.30444443,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Files","depth":16,"bounds":{"left":0.058333334,"top":0.35666665,"width":0.015972223,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"Later","depth":14,"bounds":{"left":0.048611112,"top":0.38,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Later","depth":16,"bounds":{"left":0.057638887,"top":0.43222222,"width":0.018055556,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"More…","depth":14,"bounds":{"left":0.048611112,"top":0.45555556,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"More","depth":16,"bounds":{"left":0.056944445,"top":0.50777775,"width":0.01875,"height":0.015555556},"role_description":"text"},{"role":"AXStaticText","text":"Unreads","depth":21,"bounds":{"left":0.11875,"top":0.12777779,"width":0.039583333,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Threads","depth":21,"bounds":{"left":0.11875,"top":0.12777779,"width":0.036805555,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Huddles","depth":21,"bounds":{"left":0.11875,"top":0.12777779,"width":0.038194444,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Drafts & sent","depth":21,"bounds":{"left":0.11875,"top":0.12777779,"width":0.06111111,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Directories","depth":21,"bounds":{"left":0.11875,"top":0.12777779,"width":0.050694443,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"platform-inner-team","depth":23,"bounds":{"left":0.12986112,"top":0.18222222,"width":0.093055554,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"ai-chapter","depth":23,"bounds":{"left":0.12986112,"top":0.25555557,"width":0.046527777,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"alerts","depth":23,"bounds":{"left":0.12986112,"top":0.28666666,"width":0.025694445,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"backend","depth":23,"bounds":{"left":0.12986112,"top":0.31777778,"width":0.038194444,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"confusion-clinic","depth":23,"bounds":{"left":0.12986112,"top":0.34888887,"width":0.072222225,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"curiosity_lab","depth":23,"bounds":{"left":0.12986112,"top":0.38,"width":0.057638887,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"engineering","depth":23,"bounds":{"left":0.12986112,"top":0.41111112,"width":0.054166667,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"frontend","depth":23,"bounds":{"left":0.12986112,"top":0.4422222,"width":0.04027778,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"general","depth":23,"bounds":{"left":0.12986112,"top":0.47333333,"width":0.034027778,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"infra-changes","depth":23,"bounds":{"left":0.12986112,"top":0.5044444,"width":0.061805554,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"jiminny-bg","depth":23,"bounds":{"left":0.12986112,"top":0.53555554,"width":0.048611112,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"platform-tickets","depth":23,"bounds":{"left":0.12986112,"top":0.56666666,"width":0.072916664,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"product_launches","depth":23,"bounds":{"left":0.12986112,"top":0.5977778,"width":0.08055556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"random","depth":23,"bounds":{"left":0.12986112,"top":0.6288889,"width":0.035416666,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"releases","depth":23,"bounds":{"left":0.12986112,"top":0.66,"width":0.038194444,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"sofia-office","depth":23,"bounds":{"left":0.12986112,"top":0.6911111,"width":0.05138889,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"support","depth":23,"bounds":{"left":0.12986112,"top":0.7222222,"width":0.036111113,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"thank-yous","depth":23,"bounds":{"left":0.12986112,"top":0.75333333,"width":0.05138889,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"the_people_of_jiminny","depth":23,"bounds":{"left":0.12986112,"top":0.78444445,"width":0.094444446,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Aneliya Angelova","depth":23,"bounds":{"left":0.12986112,"top":0.8577778,"width":0.07847222,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"bounds":{"left":0.20833333,"top":0.8577778,"width":0.013194445,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"bounds":{"left":0.21319444,"top":0.8577778,"width":0.029861111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"bounds":{"left":0.12986112,"top":0.8888889,"width":0.07986111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Adelina Petrova","depth":23,"bounds":{"left":0.12986112,"top":0.92,"width":0.072222225,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"bounds":{"left":0.2013889,"top":0.92,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Ilian Kyuchukov","depth":23,"bounds":{"left":0.20694445,"top":0.92,"width":0.015972223,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Adelina Petrova","depth":23,"bounds":{"left":0.12986112,"top":0.95111114,"width":0.072222225,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"bounds":{"left":0.12986112,"top":0.9822222,"width":0.07361111,"height":0.012222222},"role_description":"text"},{"role":"AXStaticText","text":"Vasil Vasilev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Nikolov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Nikolov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Jira Cloud","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Toast","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Google Calendar","depth":23,"role_description":"text"},{"role":"AXRadioButton","text":"Messages","depth":17,"bounds":{"left":0.25486112,"top":0.12777779,"width":0.06458333,"height":0.04222222},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXStaticText","text":"Messages","depth":19,"bounds":{"left":0.27430555,"top":0.14,"width":0.039583333,"height":0.017777778},"role_description":"text"},{"role":"AXRadioButton","text":"Add canvas","depth":18,"bounds":{"left":0.32152778,"top":0.12777779,"width":0.07152778,"height":0.04222222},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Add canvas","depth":20,"bounds":{"left":0.34097221,"top":0.14,"width":0.046527777,"height":0.017777778},"role_description":"text"},{"role":"AXPopUpButton","text":"Add and Edit Channel Tabs","depth":17,"bounds":{"left":0.3951389,"top":0.12777779,"width":0.022916667,"height":0.04222222},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Canvas","depth":17,"role_description":"text"},{"role":"AXStaticText","text":"List","depth":17,"role_description":"text"},{"role":"AXStaticText","text":"Folder","depth":17,"role_description":"text"},{"role":"AXPopUpButton","text":"Jump to date","depth":23,"bounds":{"left":0.59375,"top":0.17666666,"width":0.05277778,"height":0.031111112},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Nikolay Yankov","depth":24,"bounds":{"left":0.28819445,"top":0.16111112,"width":0.072222225,"height":0.0011111111},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.35972223,"top":0.16111112,"width":0.00625,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Today at 10:32:27 AM","depth":24,"bounds":{"left":0.36527777,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:32 AM","depth":25,"bounds":{"left":0.36527777,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"10 мин минаха, още не идва репорт","depth":25,"bounds":{"left":0.28819445,"top":0.16111112,"width":0.1736111,"height":0.0011111111},"role_description":"text"},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"bounds":{"left":0.28819445,"top":0.16111112,"width":0.06458333,"height":0.0011111111},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.35277778,"top":0.16111112,"width":0.0055555557,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Today at 10:34:10 AM","depth":24,"bounds":{"left":0.35833332,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:34 AM","depth":25,"bounds":{"left":0.35833332,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"не само daily но трябва да се пусне команда","depth":25,"bounds":{"left":0.28819445,"top":0.16111112,"width":0.2125,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Today at 10:35:08 AM","depth":25,"bounds":{"left":0.2611111,"top":0.16111112,"width":0.021527778,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:35","depth":26,"bounds":{"left":0.2611111,"top":0.16111112,"width":0.021527778,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"php artisan automated-reports","depth":25,"bounds":{"left":0.29444444,"top":0.16111112,"width":0.14513889,"height":0.0011111111},"role_description":"text"},{"role":"AXButton","text":"Nikolay Yankov","depth":24,"bounds":{"left":0.28819445,"top":0.16111112,"width":0.072222225,"height":0.0011111111},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.35972223,"top":0.16111112,"width":0.00625,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Today at 10:35:39 AM","depth":24,"bounds":{"left":0.36527777,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:35 AM","depth":25,"bounds":{"left":0.36527777,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"значи не създава веднага по принцип, в някакъв час на деня ли стъздава?","depth":25,"bounds":{"left":0.28819445,"top":0.16111112,"width":0.35416666,"height":0.0011111111},"role_description":"text"},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"bounds":{"left":0.28819445,"top":0.16111112,"width":0.06458333,"height":0.0011111111},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.35277778,"top":0.16111112,"width":0.0055555557,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Today at 10:36:11 AM","depth":24,"bounds":{"left":0.35833332,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:36 AM","depth":25,"bounds":{"left":0.35833332,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"това ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)","depth":25,"bounds":{"left":0.28819445,"top":0.16111112,"width":0.4451389,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Today at 10:36:27 AM","depth":25,"bounds":{"left":0.2611111,"top":0.16111112,"width":0.021527778,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:36","depth":26,"bounds":{"left":0.2611111,"top":0.16111112,"width":0.021527778,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"крон го пуска през нощ","depth":25,"bounds":{"left":0.28819445,"top":0.16111112,"width":0.11319444,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Today at 10:37:19 AM","depth":25,"bounds":{"left":0.2611111,"top":0.16111112,"width":0.021527778,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:37","depth":26,"bounds":{"left":0.2611111,"top":0.16111112,"width":0.021527778,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"така че мануално пусни при тестване","depth":25,"bounds":{"left":0.28819445,"top":0.16111112,"width":0.18055555,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Today at 10:38:26 AM","depth":25,"bounds":{"left":0.2611111,"top":0.16111112,"width":0.021527778,"height":0.015555556},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:38","depth":26,"bounds":{"left":0.2611111,"top":0.16111112,"width":0.021527778,"height":0.015555556},"role_description":"text"},{"role":"AXStaticText","text":"ако трябва да тестваме други репорти може да променя команда за тестване да приема параметър за report template и д си пускаме определен когато тестваме","depth":25,"bounds":{"left":0.28819445,"top":0.16111112,"width":0.6423611,"height":0.04},"role_description":"text"},{"role":"AXButton","text":"Nikolay Yankov","depth":24,"bounds":{"left":0.28819445,"top":0.21222222,"width":0.072222225,"height":0.024444444},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-2817339627699921757
|
-1731224370220592375
|
visual_change
|
hybrid
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
curiosity_lab
engineering
frontend
general
infra-changes
jiminny-bg
platform-tickets
product_launches
random
releases
sofia-office
support
thank-yous
the_people_of_jiminny
Aneliya Angelova
,
Nikolay Yankov
,
Steliyan Georgiev
Steliyan Georgiev
Adelina Petrova
,
Ilian Kyuchukov
,
Steliyan Georgiev
Adelina Petrova
Galya Dimitrova
Vasil Vasilev
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Yankov
Nikolay Yankov
Jira Cloud
Toast
Google Calendar
Messages
Messages
Add canvas
Add canvas
Add and Edit Channel Tabs
Canvas
List
Folder
Jump to date
Nikolay Yankov
Today at 10:32:27 AM
10:32 AM
10 мин минаха, още не идва репорт
Lukas Kovalik
Today at 10:34:10 AM
10:34 AM
не само daily но трябва да се пусне команда
Today at 10:35:08 AM
10:35
php artisan automated-reports
Nikolay Yankov
Today at 10:35:39 AM
10:35 AM
значи не създава веднага по принцип, в някакъв час на деня ли стъздава?
Lukas Kovalik
Today at 10:36:11 AM
10:36 AM
това ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)
Today at 10:36:27 AM
10:36
крон го пуска през нощ
Today at 10:37:19 AM
10:37
така че мануално пусни при тестване
Today at 10:38:26 AM
10:38
ако трябва да тестваме други репорти може да променя команда за тестване да приема параметър за report template и д си пускаме определен когато тестваме
Nikolay Yankov
+SlackFileEditViewGoHistoryWindowHelpEL→HomeDMsActivityFilesLater..•More>0 lhl# Support Daily • in 3h 3 mTue 14 Apr 11:57:44+Jiminny ...# Starred8platform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoSearch Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+tnove ne tccioune chyirponornone nunironопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan GeorgievAa100% <478Fuune 4Today ~New...
|
NULL
|
|
10768
|
212
|
45
|
2026-04-14T08:57:47.980209+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157067980_m1.jpg...
|
PhpStorm
|
faVsco.js – RequestGenerateAskJiminnyReportJob.php
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-4606786909731712808
|
-5390502312723666196
|
visual_change
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…...
|
10767
|
|
10769
|
213
|
54
|
2026-04-14T08:57:48.159457+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157068159_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEoitViewNavigateCodelaraveRetactonTool PhpStormFileEoitViewNavigateCodelaraveRetactonToolsWindowHelpFV ravsco.is#11894 on.lY-18909-automated-renorts-ask-liminnvProject vAudio• → AutomatedReportsC RequestGenerateAskJir(C) RequestGenerateRepori(©) SendReportJob.php© SendReportMailJob.php> M Calendar• Uerm> MDealRisks> MMailbox› M MeetinaBotMiddlewareStreamingTeam>W TelephonyJ UserC BaseProcessingJob.phpg DummyJob.php© ImportRecallAlRecordingsJ© ImportRemoteTrackJob.phC Job.ohnC) JobDispatcher.pho© JobDispatcherInterface.phC) PurgeSoftDeletedOpporturT SqsVisibilityControl.php> D Listeners› D Mailv _ Models>@ Activity• MAi> CJ AskAnything> M Calendar> M Connection> M ContractsCrm› ElasticSearch→ Feature> _ opportunity_ Participant_ PlaybackThemePlaylistMScorecard>MWebhookC) Account.oho© Activity.phpC Address.php(C) AiPrompt.php(C) AutomatedReport.php© AutomatedReportResult.ph(C) Calendar.phpc) Callimport.php© CoachingFeedback.php© CoachingFeedbackVisibilit© CoachingSection.phpC) CoachinaSectionCriterion.rC) CoachinaSectionCriterionFC CoachingSectionFeedback© CommentAbstract.pngD Commentinterface.php(©) ReportController.phpJiminnyDeouecommana.ongcAutomatedRenorissenccommana.ongAulomaleakeporscommand.onoC AddLayoutEntities.phpC Team.phpC AutomatedReportsRepository.pnp© AutomatedReportsService.php© CreateHeldActivityEvent.phpe) Track?roviderinstalled-vent.ono© CreateActivityLoggedevent.php(©) UserPilotActivityListener.php©) ActivityLogged.phpC) AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.phpRequestGeneratekeporJob.onoC AutomatedReportResult.php(e) AutomatedRenort.ohrclass RequestGenerateAskJ1minnyReportJob 1mplements ShouldQueue, ShouldBeUnique100101102103104105106ML0/I1081091110111112113114115116public function handlel1):return;"savedsearch = vauronareckedort-eravedsearchloIt (osavedsearch === nulb) 1nLoodere>varmnor seut.aLueracrie'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1);lecurisprompt = sautomatedReport->getAskAnythingPromptor1T (sprompt === nULU) 1s Logger->warningtselt::LU6_PREFLX•'Skipped, ask anything prompt not found', ['aucomatedkeporcuu1d = schis->reporcuuld,recurn,$this->reportResult = SreportService->createReportResult(automatedReport: sautomatedReport,data: L'status' => AutomatedReportResult::STATUS_DEFAULT,"medla_type => Automacedkeporcsservice:.REULA_TYPE_PUr.SactivitvIds = SactivitvService->getActivitvIdsForSavedSearch0savedSearch: SsavedSearch,user: $creator.):$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', ['automatedReportuuld' => sthis->reportuuld,activitycount = count(sactivitylas),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {Sthis->failReport@ reason: AutomatedReportResult::REASON_NOT ENOUGH ACTIVTTIES):SLoqger->info(self::LOG_PREFIX .Not enough activities, skipped', l'automatedReportUuid' => $this->reportUuid,'activityCount" => count(Sactivitylds),1);Pecurtlda Support Daily • in 3 h 3 m100% [2Tue 14 Apr 11:57:47RequestGenerateAsk.liminnvRenort.lob Test v= custom.log= laravel.loge SF (iminny@localhostc HS_local fiminny@localhost)& console (PROD]& console (EU]L console (STAGINGC AskJiminnyReportActivityService.phpRequestGenerateaskyiminnykeportJoblest.pnpV2 21 лclass ASkJ1minnyReportActiv1tyservice3961626364private const 1nt DEFAULI_/UP_ACIIVLILES_COUNl = 100;private const array [ENV_SECRET] START DATE.ActivitvActualDate::PARAM END DATE.ActivityUpdatedDate::PARAM_UPDATED_FROMActivityUpdatedDate::PARAM_UPDATED_ TO,ClosingPeriodFilter::KEY_START DATE,ClosingPer1odr1lter::KEY_END_DATE,pubLic tunction -_constructprivate readonly Aculvitysearch sacuivitysearch,private readonly ElasticActivitykeposicory selasclckepository.orvare reaconuy Loocerinuertace "Lodder• 4...3* Fetch activity IDs for a saved search, passing its filters as-is to Criteria* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint 1s applied - matching the behaviour of getcontextrorAskAnythingßyrilter.* @return string[] Activity IDs*/pubuic tunccion getAcuivity.asrorsavedsearchcsearch ssaveosearch.iuser nuser.0: array 4SrequestParams = Sthis->buildRequestParamsFromSearchSsavedSearch, Suser):Scriteria = Criteria::createFromRequestoarray_merge($requestParams, L'Limit' => seLf::DEFAULT_TOP_ACTIVITTES_COUNT, 'page' => 1J),suser->getlimezoneptilterser = suhls-›aculvitysearch->gecunbemandrager1ltersec(scriterla, suser)i$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AskJiminnyReport] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getido,'user id'= Suser->getido'activity_count' => count($activitylds),1):return sactivitvids.private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array(...}W Winasurt leams100:34uir-oia 4 spaces...
|
NULL
|
-2332733168654394375
|
NULL
|
visual_change
|
ocr
|
NULL
|
PhpStormFileEoitViewNavigateCodelaraveRetactonTool PhpStormFileEoitViewNavigateCodelaraveRetactonToolsWindowHelpFV ravsco.is#11894 on.lY-18909-automated-renorts-ask-liminnvProject vAudio• → AutomatedReportsC RequestGenerateAskJir(C) RequestGenerateRepori(©) SendReportJob.php© SendReportMailJob.php> M Calendar• Uerm> MDealRisks> MMailbox› M MeetinaBotMiddlewareStreamingTeam>W TelephonyJ UserC BaseProcessingJob.phpg DummyJob.php© ImportRecallAlRecordingsJ© ImportRemoteTrackJob.phC Job.ohnC) JobDispatcher.pho© JobDispatcherInterface.phC) PurgeSoftDeletedOpporturT SqsVisibilityControl.php> D Listeners› D Mailv _ Models>@ Activity• MAi> CJ AskAnything> M Calendar> M Connection> M ContractsCrm› ElasticSearch→ Feature> _ opportunity_ Participant_ PlaybackThemePlaylistMScorecard>MWebhookC) Account.oho© Activity.phpC Address.php(C) AiPrompt.php(C) AutomatedReport.php© AutomatedReportResult.ph(C) Calendar.phpc) Callimport.php© CoachingFeedback.php© CoachingFeedbackVisibilit© CoachingSection.phpC) CoachinaSectionCriterion.rC) CoachinaSectionCriterionFC CoachingSectionFeedback© CommentAbstract.pngD Commentinterface.php(©) ReportController.phpJiminnyDeouecommana.ongcAutomatedRenorissenccommana.ongAulomaleakeporscommand.onoC AddLayoutEntities.phpC Team.phpC AutomatedReportsRepository.pnp© AutomatedReportsService.php© CreateHeldActivityEvent.phpe) Track?roviderinstalled-vent.ono© CreateActivityLoggedevent.php(©) UserPilotActivityListener.php©) ActivityLogged.phpC) AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.phpRequestGeneratekeporJob.onoC AutomatedReportResult.php(e) AutomatedRenort.ohrclass RequestGenerateAskJ1minnyReportJob 1mplements ShouldQueue, ShouldBeUnique100101102103104105106ML0/I1081091110111112113114115116public function handlel1):return;"savedsearch = vauronareckedort-eravedsearchloIt (osavedsearch === nulb) 1nLoodere>varmnor seut.aLueracrie'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1);lecurisprompt = sautomatedReport->getAskAnythingPromptor1T (sprompt === nULU) 1s Logger->warningtselt::LU6_PREFLX•'Skipped, ask anything prompt not found', ['aucomatedkeporcuu1d = schis->reporcuuld,recurn,$this->reportResult = SreportService->createReportResult(automatedReport: sautomatedReport,data: L'status' => AutomatedReportResult::STATUS_DEFAULT,"medla_type => Automacedkeporcsservice:.REULA_TYPE_PUr.SactivitvIds = SactivitvService->getActivitvIdsForSavedSearch0savedSearch: SsavedSearch,user: $creator.):$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', ['automatedReportuuld' => sthis->reportuuld,activitycount = count(sactivitylas),1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {Sthis->failReport@ reason: AutomatedReportResult::REASON_NOT ENOUGH ACTIVTTIES):SLoqger->info(self::LOG_PREFIX .Not enough activities, skipped', l'automatedReportUuid' => $this->reportUuid,'activityCount" => count(Sactivitylds),1);Pecurtlda Support Daily • in 3 h 3 m100% [2Tue 14 Apr 11:57:47RequestGenerateAsk.liminnvRenort.lob Test v= custom.log= laravel.loge SF (iminny@localhostc HS_local fiminny@localhost)& console (PROD]& console (EU]L console (STAGINGC AskJiminnyReportActivityService.phpRequestGenerateaskyiminnykeportJoblest.pnpV2 21 лclass ASkJ1minnyReportActiv1tyservice3961626364private const 1nt DEFAULI_/UP_ACIIVLILES_COUNl = 100;private const array [ENV_SECRET] START DATE.ActivitvActualDate::PARAM END DATE.ActivityUpdatedDate::PARAM_UPDATED_FROMActivityUpdatedDate::PARAM_UPDATED_ TO,ClosingPeriodFilter::KEY_START DATE,ClosingPer1odr1lter::KEY_END_DATE,pubLic tunction -_constructprivate readonly Aculvitysearch sacuivitysearch,private readonly ElasticActivitykeposicory selasclckepository.orvare reaconuy Loocerinuertace "Lodder• 4...3* Fetch activity IDs for a saved search, passing its filters as-is to Criteria* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint 1s applied - matching the behaviour of getcontextrorAskAnythingßyrilter.* @return string[] Activity IDs*/pubuic tunccion getAcuivity.asrorsavedsearchcsearch ssaveosearch.iuser nuser.0: array 4SrequestParams = Sthis->buildRequestParamsFromSearchSsavedSearch, Suser):Scriteria = Criteria::createFromRequestoarray_merge($requestParams, L'Limit' => seLf::DEFAULT_TOP_ACTIVITTES_COUNT, 'page' => 1J),suser->getlimezoneptilterser = suhls-›aculvitysearch->gecunbemandrager1ltersec(scriterla, suser)i$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AskJiminnyReport] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getido,'user id'= Suser->getido'activity_count' => count($activitylds),1):return sactivitvids.private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array(...}W Winasurt leams100:34uir-oia 4 spaces...
|
NULL
|
|
10770
|
212
|
46
|
2026-04-14T08:57:49.068380+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157069068_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
+SlackEDHomeDMsActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMsActivityFilesLater..•MoreFileEditViewGoHistoryWindowHelp→+Jiminny ...# Starred8platform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea Dimitravo<Search Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+tnove ne tccioune chyirponormone nunpomопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan GeorgievAaSupport Daily - in 3 h 3 m100% <478Tue 14 Apr 11:57:48Fuune 4Today ~New...
|
NULL
|
-2854472756693730765
|
NULL
|
click
|
ocr
|
NULL
|
+SlackEDHomeDMsActivityFilesLater..•MoreFileEditVi +SlackEDHomeDMsActivityFilesLater..•MoreFileEditViewGoHistoryWindowHelp→+Jiminny ...# Starred8platform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea Dimitravo<Search Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+tnove ne tccioune chyirponormone nunpomопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan GeorgievAaSupport Daily - in 3 h 3 m100% <478Tue 14 Apr 11:57:48Fuune 4Today ~New...
|
NULL
|
|
10771
|
212
|
47
|
2026-04-14T08:58:03.063077+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157083063_m1.jpg...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityService.php
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-1920847021272450725
|
-5390502312724452628
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
10770
|
|
10772
|
213
|
55
|
2026-04-14T08:58:03.058648+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157083058_m2.jpg...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityService.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14960937,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.76171875,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"bounds":{"left":0.7796875,"top":0.017361112,"width":0.12109375,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.45,"top":0.1736111,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.46132812,"top":0.17222223,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.4699219,"top":0.17222223,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.9476563,"top":0.0875,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.959375,"top":0.0875,"width":0.00859375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.9699219,"top":0.08611111,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.9785156,"top":0.08611111,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.0140625,"top":0.041666668,"width":0.028515626,"height":0.021527778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-1920847021272450725
|
-5390502312724452628
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
10769
|
|
10773
|
212
|
48
|
2026-04-14T08:58:04.813152+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157084813_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
+SlackEDHomeDMSActivityFilesLater..•More+FileEditV +SlackEDHomeDMSActivityFilesLater..•More+FileEditViewGoHistoryWindowHelp> 0→Search Jiminny IncJiminny ...Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev# Starredplatform-inner-teamMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тествамеChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi…..Nikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщото• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h 2 m100% <478Tue 14 Apr 11:58:04Fuune 4Today ~New...
|
NULL
|
6922767270132434281
|
NULL
|
click
|
ocr
|
NULL
|
+SlackEDHomeDMSActivityFilesLater..•More+FileEditV +SlackEDHomeDMSActivityFilesLater..•More+FileEditViewGoHistoryWindowHelp> 0→Search Jiminny IncJiminny ...Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev# Starredplatform-inner-teamMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тествамеChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi…..Nikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщото• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h 2 m100% <478Tue 14 Apr 11:58:04Fuune 4Today ~New...
|
NULL
|
|
10774
|
213
|
56
|
2026-04-14T08:58:04.806565+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157084806_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEoitViewNavigateCodelaraveRefactonTool PhpStormFileEoitViewNavigateCodelaraveRefactonToolsWindowHelpFV faVsco.s v#11894 on JY-18909-automated-reports-ask-liminny k vProject v© DeviceRepository.phpC ElasticActivityRepository.p© EmailMessageRepository.p© GenericAiPromptRepositor© GroupRepository.php(C InboxEmailBatchRepositor)C InboxRepository.pnp© InvitationRepository.phpC) JobRepository.phpC) LanquageRepository.php© MomentRepository.phpNotificationRepository.phpC) ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.phpC PlavlistActivityRepository.p(© PlaylistRepository.png(C PlaylistShareRepository.phC) QuestionRepository.phpC) RoleChangeEventRepositolC RoleRepository.php© SearchRepository.phpC SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.(C) TaskRepository.phoC TeamAiContextRepository.©) TeamDomainsRepository.p(©) TeaminsightsRepository.phC) TeamRepository.phpC ThemeRepository.phpC TimezoneRepository.php© TopicRepository.php© TоpicTriggerRepository.ph© TrackRepository.phpC) TranscriptionModelLocaleF© TranscriptionRepository.prC) TranscriptionSummarvRepC UserRepository.php© VocabularyRepository.pnp› Rulesv D Services>D Activity>D AReportsAvatarcalendarM ConferenceM Crm>MImport> MInternalv → Kioskv _ AutomatedReports(C) ActivityTypeService.(©) AskJiminnyReportAc(C) AutomatedReportse(C) AutomatedReportsSc) ReportController.onpJiminnybeouecommana.ongC AutomatedReportsSendCommand.php© AutomatedReportsCommand.phpC AddLayoutEntities.phpC Team.phpC AutomatedReportsRepository.pnp© AutomatedReportsService.phpCreateHeldActivityEvent.phpe) TrackProvidernstallled-vent.ono© CreateActivityLoggedevent.php(©) UserPilotActivityListener.php©) ActivityLogged.phpC) AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.phpRequestGeneratekeporJob.onoC AutomatedReportResult.php(e) AutomatedRenort.ohrclass RequestGenerateAskJ1minnyReportJob 1mplements ShouldQueue, ShouldBeUnique818283100101102103104105106ML0/I1081091110111112113114115116public function handlel1):Tecurtin"savedsearch = vauronareckedort-eravedsearchloif (SsavedSearch === null) &+Logger->warninglselt..Luo_PkErLX'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1):lecurisprompt = sautomatedReport->getAskAnythingPrompton1T (sprompt === nULU) 1$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', ['aucomatedkeporcuuld = suhis->reporcuuld,recurn,$this->reportResult = SreportService->createReportResult(automatedReport: sautomatedReport,data: L'status' => AutomatedReportresult::STATUS_DEFAULT,"medla_type => Automacedkeporcsservice:.REULA_TYPE_PUr.SactivitvIds = SactivitvService->getActivitvIdsForSavedSearch0savedSearch: SsavedSearch,user: $creator.):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', ['automatedReportuuld' => sthis->reportuuld,activitycount = count(pactivitylas).1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {Sthis->failReport@ reason: AutomatedReportResult::REASON_NOT ENOUGH ACTIVTTIES):SLoqger->info(self::LOG_PREFIX .Not enough activities, skipped', l'automatedReportUuid' => $this->reportUvid,'activityCount" => count(Sactivitylds),1);PecurtldWinasurt changelog 2.12.21: A new version is avallable. # View Changelog (today 10:33,50 lalaSupport Daily • in 3h 2 m100% [Tue 14 Apr 11:58:04• RequestGenerateAskJiminnyReportJobTest v= custom.log= laravel.lode SF (iminny@localhostc HS_local fiminny@localhost)& console (PROD]& console (EU]L console (STAGINGC AskJiminnyReportActivityService.phpRequestGenerateaskJiminnykeportJoblest.pnpV2 21 лclass ASKJ1minnyReportAct1v1tyService39616263private const 1nt DEFAULI_TUP_ACIIVLILES_COUNI = 100;private const array [ENV_SECRET] START DATE.ActivitvActualDate::PARAM END DATE.ActivityUpdatedDate::PARAM_UPDATED_FROMActivityUpdatedDate::PARAM_UPDATED_ TO,ClosingPeriodFilter::KEY_START DATE,ClosingPer1odr1lter::KEY_END_DATE,pubLic tunction -_constructprivate readonly Aculvicysearch sacuivitysearch,private readonly ElasticActivitykeposicory selasclckepository.orvare reaconuy Loocerinuertace "Lodder• 4...3* Fetch activity IDs for a saved search, passing its filters as-is to Criteria* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint 1s applied - matching the behaviour of getcontextrorAskAnythingßyrilter.* @return string[] Activity IDspubuic tunccion getAcuivity.asrorsavedsearchcsearch ssaveosearch.iuser nuser.0: array 4$requestParams = Sthis->buildRequestParamsFromSearchSsavedSearch, Suser):$criteria = Criteria::createFromkeqestcarray_merge($requestParams, L'Limit' => seLf::DEFAULT_TOP_ACTIVITTES_COUNT, 'page' => 1J),suser->getlimezoneptilterser = suhls-›aculvitysearch-›gecunbemandrageriltersec(scriterla, suser))$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getido,'user id'=> Suser->getido'activity_count' => count($activitylds),1):return sactivitvids.private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array(...}w windsurt leams40:43uir-oia 4 spaces...
|
NULL
|
6324694747258225991
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEoitViewNavigateCodelaraveRefactonTool PhpStormFileEoitViewNavigateCodelaraveRefactonToolsWindowHelpFV faVsco.s v#11894 on JY-18909-automated-reports-ask-liminny k vProject v© DeviceRepository.phpC ElasticActivityRepository.p© EmailMessageRepository.p© GenericAiPromptRepositor© GroupRepository.php(C InboxEmailBatchRepositor)C InboxRepository.pnp© InvitationRepository.phpC) JobRepository.phpC) LanquageRepository.php© MomentRepository.phpNotificationRepository.phpC) ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.phpC PlavlistActivityRepository.p(© PlaylistRepository.png(C PlaylistShareRepository.phC) QuestionRepository.phpC) RoleChangeEventRepositolC RoleRepository.php© SearchRepository.phpC SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.(C) TaskRepository.phoC TeamAiContextRepository.©) TeamDomainsRepository.p(©) TeaminsightsRepository.phC) TeamRepository.phpC ThemeRepository.phpC TimezoneRepository.php© TopicRepository.php© TоpicTriggerRepository.ph© TrackRepository.phpC) TranscriptionModelLocaleF© TranscriptionRepository.prC) TranscriptionSummarvRepC UserRepository.php© VocabularyRepository.pnp› Rulesv D Services>D Activity>D AReportsAvatarcalendarM ConferenceM Crm>MImport> MInternalv → Kioskv _ AutomatedReports(C) ActivityTypeService.(©) AskJiminnyReportAc(C) AutomatedReportse(C) AutomatedReportsSc) ReportController.onpJiminnybeouecommana.ongC AutomatedReportsSendCommand.php© AutomatedReportsCommand.phpC AddLayoutEntities.phpC Team.phpC AutomatedReportsRepository.pnp© AutomatedReportsService.phpCreateHeldActivityEvent.phpe) TrackProvidernstallled-vent.ono© CreateActivityLoggedevent.php(©) UserPilotActivityListener.php©) ActivityLogged.phpC) AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.phpRequestGeneratekeporJob.onoC AutomatedReportResult.php(e) AutomatedRenort.ohrclass RequestGenerateAskJ1minnyReportJob 1mplements ShouldQueue, ShouldBeUnique818283100101102103104105106ML0/I1081091110111112113114115116public function handlel1):Tecurtin"savedsearch = vauronareckedort-eravedsearchloif (SsavedSearch === null) &+Logger->warninglselt..Luo_PkErLX'Skipped, saved search not found', ['automatedReportUuid' => Sthis-›reportUuid1):lecurisprompt = sautomatedReport->getAskAnythingPrompton1T (sprompt === nULU) 1$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', ['aucomatedkeporcuuld = suhis->reporcuuld,recurn,$this->reportResult = SreportService->createReportResult(automatedReport: sautomatedReport,data: L'status' => AutomatedReportresult::STATUS_DEFAULT,"medla_type => Automacedkeporcsservice:.REULA_TYPE_PUr.SactivitvIds = SactivitvService->getActivitvIdsForSavedSearch0savedSearch: SsavedSearch,user: $creator.):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs', ['automatedReportuuld' => sthis->reportuuld,activitycount = count(pactivitylas).1):if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {Sthis->failReport@ reason: AutomatedReportResult::REASON_NOT ENOUGH ACTIVTTIES):SLoqger->info(self::LOG_PREFIX .Not enough activities, skipped', l'automatedReportUuid' => $this->reportUvid,'activityCount" => count(Sactivitylds),1);PecurtldWinasurt changelog 2.12.21: A new version is avallable. # View Changelog (today 10:33,50 lalaSupport Daily • in 3h 2 m100% [Tue 14 Apr 11:58:04• RequestGenerateAskJiminnyReportJobTest v= custom.log= laravel.lode SF (iminny@localhostc HS_local fiminny@localhost)& console (PROD]& console (EU]L console (STAGINGC AskJiminnyReportActivityService.phpRequestGenerateaskJiminnykeportJoblest.pnpV2 21 лclass ASKJ1minnyReportAct1v1tyService39616263private const 1nt DEFAULI_TUP_ACIIVLILES_COUNI = 100;private const array [ENV_SECRET] START DATE.ActivitvActualDate::PARAM END DATE.ActivityUpdatedDate::PARAM_UPDATED_FROMActivityUpdatedDate::PARAM_UPDATED_ TO,ClosingPeriodFilter::KEY_START DATE,ClosingPer1odr1lter::KEY_END_DATE,pubLic tunction -_constructprivate readonly Aculvicysearch sacuivitysearch,private readonly ElasticActivitykeposicory selasclckepository.orvare reaconuy Loocerinuertace "Lodder• 4...3* Fetch activity IDs for a saved search, passing its filters as-is to Criteria* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint 1s applied - matching the behaviour of getcontextrorAskAnythingßyrilter.* @return string[] Activity IDspubuic tunccion getAcuivity.asrorsavedsearchcsearch ssaveosearch.iuser nuser.0: array 4$requestParams = Sthis->buildRequestParamsFromSearchSsavedSearch, Suser):$criteria = Criteria::createFromkeqestcarray_merge($requestParams, L'Limit' => seLf::DEFAULT_TOP_ACTIVITTES_COUNT, 'page' => 1J),suser->getlimezoneptilterser = suhls-›aculvitysearch-›gecunbemandrageriltersec(scriterla, suser))$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getido,'user id'=> Suser->getido'activity_count' => count($activitylds),1):return sactivitvids.private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array(...}w windsurt leams40:43uir-oia 4 spaces...
|
NULL
|
|
10775
|
212
|
49
|
2026-04-14T08:58:06.403239+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157086403_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
+SlackEDHomeDMSActivityFilesLater..•More+FileEditV +SlackEDHomeDMSActivityFilesLater..•More+FileEditViewGoHistoryWindowHelp> 0→Search Jiminny IncJiminny ...Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev# Starredplatform-inner-teamMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тествамеChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi…..Nikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщото• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h 2 m100% C48Tue 14 Apr 11:58:06Fuune 4Today ~New...
|
NULL
|
-2702678767692663127
|
NULL
|
click
|
ocr
|
NULL
|
+SlackEDHomeDMSActivityFilesLater..•More+FileEditV +SlackEDHomeDMSActivityFilesLater..•More+FileEditViewGoHistoryWindowHelp> 0→Search Jiminny IncJiminny ...Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev# Starredplatform-inner-teamMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тествамеChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi…..Nikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщото• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h 2 m100% C48Tue 14 Apr 11:58:06Fuune 4Today ~New...
|
10773
|
|
10776
|
213
|
57
|
2026-04-14T08:58:09.952592+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157089952_m2.jpg...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityService.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14960937,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.76171875,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"bounds":{"left":0.7796875,"top":0.017361112,"width":0.12109375,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.45,"top":0.1736111,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.46132812,"top":0.17222223,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.4699219,"top":0.17222223,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.9476563,"top":0.0875,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.959375,"top":0.0875,"width":0.00859375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.9699219,"top":0.08611111,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.9785156,"top":0.08611111,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.0140625,"top":0.041666668,"width":0.028515626,"height":0.021527778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-1920847021272450725
|
-5390502312724452628
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
10774
|
|
10777
|
212
|
50
|
2026-04-14T08:58:09.956756+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157089956_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
+SlackEDHomeDMSActivityFilesLater..•More+FileEditV +SlackEDHomeDMSActivityFilesLater..•More+FileEditViewGoHistoryWindowHelp> 0→Search Jiminny IncJiminny ...Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev# Starredplatform-inner-teamMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тествамеChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi…..Nikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщото• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h 2 m100% C48Tue 14 Apr 11:58:09Fuune 4Today ~New...
|
NULL
|
7863082276546672682
|
NULL
|
click
|
ocr
|
NULL
|
+SlackEDHomeDMSActivityFilesLater..•More+FileEditV +SlackEDHomeDMSActivityFilesLater..•More+FileEditViewGoHistoryWindowHelp> 0→Search Jiminny IncJiminny ...Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev# Starredplatform-inner-teamMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тествамеChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi…..Nikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщото• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h 2 m100% C48Tue 14 Apr 11:58:09Fuune 4Today ~New...
|
NULL
|
|
10778
|
213
|
58
|
2026-04-14T08:58:13.732386+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157093732_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditFV faVsco.js vViewNavigateCodeLara PhpStormFileEditFV faVsco.js vViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php(C) InboxEmailBatchRepositon)InboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> C AjReportsDAvatarcalendarD ConferenceD Crm>MImport> MInternalv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© JiminnyDebugCommand.php© AutomatedReportsSendCommand.phpC AutomatedReportsCommand.php© AddLayoutEntities.php© Team.phpAutomaleakeporsservice.ong© AutomatedReportsRepository.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpCrealeAcuivilyLogqedbvent.ono(C) User?llorActivivuistener.ohn© ActivityLogged.phpc) AutomatedRenorscalloackoerwce.onv© RequestGenerateAskJiminnyReportJob.php x(©) RequestGenerateReportJob.php(C) AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements opublic function handle(1):У3 ^v,258486878889100101102103104105106107110111.112return;ssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &sLogger->warnangtsecr..Luo_Pkeria • Skipped, Saved $36'automatedReportUuid' = $this->reportUvid,1):lecurlin$prompt = $automatedReport->getAskAnythingPrompt();if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask an45aucomatedkeporcuuld = suhis->reporcuula,1);recurny$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService::MEDIA_TVF56SactivityIds = $activityService->getActivityIdsForSavedSe& 60savedSearch: $savedSearch,user: $creator,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs','automatedReportUvid' = $this->reportUvid,'activityCount' => count($activityIds),I);if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {nuns->rau uredor reason. Aurolareckeportresult..kcAsul$logger->info(self::LOG_PREFIX .' Not enough activit:'automatedReportUuid' => $this->reportUvid,Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log4 console [EUl= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]console SlAGING© AskJiminnyReportActivityService.php xA console [PROD]© RequestGenerateAskJiminnyReportJobTest.phpN2R1 A Yclass AskJiminnyReportActivityServiceprivate const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function __construct(private readonly ActivitySearch $activitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loccerinuertace "Lodder) 1...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDspubLic tuncuion gecAculvity-asrorsavedsearcneSearch SsavedSearch,user puser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria::createFromRequest(array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),$user->getTimezone()ptilterset = suhls-›aculvitysearch-›gecunbemandrageriltersec(scriterla, suser):$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AsKLiminnxReRQrt] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getId(),'user_id' => $user-›getId(),'activity_count' => count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): arrayf...}j Support Daily • in 3h 2mAL RequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:58:13CascadeFixing ReportControlle• Automated Report N• Automated Report L+D ...3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsauconacedkeporcuuld, actlvicycount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportUuid, activityCountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITIES.4b. Error path (exception):[AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService - the requestParams built from the saved search are not logged (only acalvity count2. RequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate - so if we fail at count check, we never see the payloadIcan add loaaina to expose the apolied filters and the actual activity IDs when the count is low. Want me to addthat?Askino •uestion• What would you like to improve?What would you like to improve?Loo tne aoolee Tters recuestrarams)rrom the saveo searchAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actuapactivity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tInc udedbolLog filters + activity IDs in AskJiminnyReportActivityServicepther answer+ <> CodeClaude Sonnet 4.6Skipwinasun leams48:40uir-o( 4 spaces...
|
NULL
|
1578236977182126772
|
NULL
|
visual_change
|
ocr
|
NULL
|
PhpStormFileEditFV faVsco.js vViewNavigateCodeLara PhpStormFileEditFV faVsco.js vViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php(C) InboxEmailBatchRepositon)InboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> C AjReportsDAvatarcalendarD ConferenceD Crm>MImport> MInternalv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© JiminnyDebugCommand.php© AutomatedReportsSendCommand.phpC AutomatedReportsCommand.php© AddLayoutEntities.php© Team.phpAutomaleakeporsservice.ong© AutomatedReportsRepository.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpCrealeAcuivilyLogqedbvent.ono(C) User?llorActivivuistener.ohn© ActivityLogged.phpc) AutomatedRenorscalloackoerwce.onv© RequestGenerateAskJiminnyReportJob.php x(©) RequestGenerateReportJob.php(C) AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements opublic function handle(1):У3 ^v,258486878889100101102103104105106107110111.112return;ssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &sLogger->warnangtsecr..Luo_Pkeria • Skipped, Saved $36'automatedReportUuid' = $this->reportUvid,1):lecurlin$prompt = $automatedReport->getAskAnythingPrompt();if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask an45aucomatedkeporcuuld = suhis->reporcuula,1);recurny$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService::MEDIA_TVF56SactivityIds = $activityService->getActivityIdsForSavedSe& 60savedSearch: $savedSearch,user: $creator,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs','automatedReportUvid' = $this->reportUvid,'activityCount' => count($activityIds),I);if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {nuns->rau uredor reason. Aurolareckeportresult..kcAsul$logger->info(self::LOG_PREFIX .' Not enough activit:'automatedReportUuid' => $this->reportUvid,Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log4 console [EUl= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]console SlAGING© AskJiminnyReportActivityService.php xA console [PROD]© RequestGenerateAskJiminnyReportJobTest.phpN2R1 A Yclass AskJiminnyReportActivityServiceprivate const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function __construct(private readonly ActivitySearch $activitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loccerinuertace "Lodder) 1...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDspubLic tuncuion gecAculvity-asrorsavedsearcneSearch SsavedSearch,user puser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria::createFromRequest(array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),$user->getTimezone()ptilterset = suhls-›aculvitysearch-›gecunbemandrageriltersec(scriterla, suser):$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AsKLiminnxReRQrt] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getId(),'user_id' => $user-›getId(),'activity_count' => count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): arrayf...}j Support Daily • in 3h 2mAL RequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:58:13CascadeFixing ReportControlle• Automated Report N• Automated Report L+D ...3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsauconacedkeporcuuld, actlvicycount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportUuid, activityCountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITIES.4b. Error path (exception):[AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService - the requestParams built from the saved search are not logged (only acalvity count2. RequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate - so if we fail at count check, we never see the payloadIcan add loaaina to expose the apolied filters and the actual activity IDs when the count is low. Want me to addthat?Askino •uestion• What would you like to improve?What would you like to improve?Loo tne aoolee Tters recuestrarams)rrom the saveo searchAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actuapactivity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tInc udedbolLog filters + activity IDs in AskJiminnyReportActivityServicepther answer+ <> CodeClaude Sonnet 4.6Skipwinasun leams48:40uir-o( 4 spaces...
|
NULL
|
|
10779
|
NULL
|
0
|
2026-04-14T08:58:19.384651+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157099384_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
+SlackEDHomeDMSActivityFilesLater..•More+FileEditV +SlackEDHomeDMSActivityFilesLater..•More+FileEditViewGoHistoryWindowHelp> 0→Search Jiminny IncJiminny ...Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev# Starredplatform-inner-teamMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тествамеChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi…..Nikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщото• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h 2 m100% C48Tue 14 Apr 11:58:19Fuune 4Today ~New...
|
NULL
|
-8437864004237255915
|
NULL
|
click
|
ocr
|
NULL
|
+SlackEDHomeDMSActivityFilesLater..•More+FileEditV +SlackEDHomeDMSActivityFilesLater..•More+FileEditViewGoHistoryWindowHelp> 0→Search Jiminny IncJiminny ...Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev# Starredplatform-inner-teamMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тествамеChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi…..Nikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщото• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea DimitravoCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h 2 m100% C48Tue 14 Apr 11:58:19Fuune 4Today ~New...
|
10777
|
|
10780
|
NULL
|
0
|
2026-04-14T08:58:19.423899+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157099423_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditFV faVsco.js vViewNavigateCodeLara PhpStormFileEditFV faVsco.js vViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php(C) InboxEmailBatchRepositon)InboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> C AjReportsDAvatarcalendarD ConferenceD Crm>MImport> MInternalv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© JiminnyDebugCommand.php© AutomatedReportsSendCommand.phpC AutomatedReportsCommand.php© AddLayoutEntities.php© Team.phpAutomaleakeporsservice.ong© AutomatedReportsRepository.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpCrealeAcuivilyLogqedbvent.ono(C) User?llorActivivuistener.ohn© ActivityLogged.phpc) AutomatedRenorscalloackoerwce.onv© RequestGenerateAskJiminnyReportJob.php x(©) RequestGenerateReportJob.php(C) AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements opublic function handle(1):У3 ^v,258486878889100101102103104105106107110111.112return;ssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &sLogger->warnangtsecr..Luo_Pkeria • Skipped, Saved $36'automatedReportUuid' = $this->reportUvid,1):lecurlin$prompt = $automatedReport->getAskAnythingPrompt();if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask an45aucomatedkeporcuuld = suhis->reporcuula,1);recurny$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService::MEDIA_TVF56SactivityIds = $activityService->getActivityIdsForSavedSe& 60savedSearch: $savedSearch,user: $creator,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs','automatedReportUvid' = $this->reportUvid,'activityCount' => count($activityIds),I);if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {nuns->rau uredor reason. Aurolareckeportresult..kcAsul$logger->info(self::LOG_PREFIX .' Not enough activit:'automatedReportUuid' => $this->reportUvid,Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log4 console [EUl= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]console SlAGING© AskJiminnyReportActivityService.php xA console [PROD]© RequestGenerateAskJiminnyReportJobTest.phpN2R1 A Yclass AskJiminnyReportActivityServiceprivate const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function __construct(private readonly ActivitySearch $activitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loccerinuertace "Lodder) 1...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDspubLic tuncuion gecAculvity-asrorsavedsearcneSearch SsavedSearch,user puser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria::createFromRequest(array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),$user->getTimezone()ptilterset = suhls-›aculvitysearch-›gecunbemandrageriltersec(scriterla, suser):$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AsKLiminnxReRQrt] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getId(),'user_id' => $user-›getId(),'activity_count' => count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): arrayf...}j Support Daily • in 3h 2mAL RequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:58:19CascadeFixing ReportControlle• Automated Report N• Automated Report L+D ...3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsauconacedkeporcuuld, actlvicycount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportUuid, activityCountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITIES.4b. Error path (exception):[AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService - the requestParams built from the saved search are not logged (only acalvity count2. RequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate - so if we fail at count check, we never see the payloadIcan add loaaina to expose the apolied filters and the actual activity IDs when the count is low. Want me to addthat?Askino •uestion• What would you like to improve?What would you like to improve?Loo tne aoolee Tters recuestrarams)rrom the saveo searchAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tInc ludedbolLog filters + activity IDs in AskJiminnyReportActivityServiceother answ+ <> CodeClaude Sonnet 4.6Skipwinasun leams48:40uir-o( 4 spaces...
|
NULL
|
1708373518180744534
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEditFV faVsco.js vViewNavigateCodeLara PhpStormFileEditFV faVsco.js vViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php(C) InboxEmailBatchRepositon)InboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> C AjReportsDAvatarcalendarD ConferenceD Crm>MImport> MInternalv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© JiminnyDebugCommand.php© AutomatedReportsSendCommand.phpC AutomatedReportsCommand.php© AddLayoutEntities.php© Team.phpAutomaleakeporsservice.ong© AutomatedReportsRepository.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpCrealeAcuivilyLogqedbvent.ono(C) User?llorActivivuistener.ohn© ActivityLogged.phpc) AutomatedRenorscalloackoerwce.onv© RequestGenerateAskJiminnyReportJob.php x(©) RequestGenerateReportJob.php(C) AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements opublic function handle(1):У3 ^v,258486878889100101102103104105106107110111.112return;ssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &sLogger->warnangtsecr..Luo_Pkeria • Skipped, Saved $36'automatedReportUuid' = $this->reportUvid,1):lecurlin$prompt = $automatedReport->getAskAnythingPrompt();if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask an45aucomatedkeporcuuld = suhis->reporcuula,1);recurny$this->reportResult = $reportService->createReportResult(automatedReport: $automatedReport,data: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService::MEDIA_TVF56SactivityIds = $activityService->getActivityIdsForSavedSe& 60savedSearch: $savedSearch,user: $creator,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs','automatedReportUvid' = $this->reportUvid,'activityCount' => count($activityIds),I);if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {nuns->rau uredor reason. Aurolareckeportresult..kcAsul$logger->info(self::LOG_PREFIX .' Not enough activit:'automatedReportUuid' => $this->reportUvid,Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log4 console [EUl= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]console SlAGING© AskJiminnyReportActivityService.php xA console [PROD]© RequestGenerateAskJiminnyReportJobTest.phpN2R1 A Yclass AskJiminnyReportActivityServiceprivate const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function __construct(private readonly ActivitySearch $activitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loccerinuertace "Lodder) 1...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDspubLic tuncuion gecAculvity-asrorsavedsearcneSearch SsavedSearch,user puser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria::createFromRequest(array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),$user->getTimezone()ptilterset = suhls-›aculvitysearch-›gecunbemandrageriltersec(scriterla, suser):$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AsKLiminnxReRQrt] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getId(),'user_id' => $user-›getId(),'activity_count' => count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): arrayf...}j Support Daily • in 3h 2mAL RequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:58:19CascadeFixing ReportControlle• Automated Report N• Automated Report L+D ...3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsauconacedkeporcuuld, actlvicycount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportUuid, activityCountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITIES.4b. Error path (exception):[AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService - the requestParams built from the saved search are not logged (only acalvity count2. RequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate - so if we fail at count check, we never see the payloadIcan add loaaina to expose the apolied filters and the actual activity IDs when the count is low. Want me to addthat?Askino •uestion• What would you like to improve?What would you like to improve?Loo tne aoolee Tters recuestrarams)rrom the saveo searchAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tInc ludedbolLog filters + activity IDs in AskJiminnyReportActivityServiceother answ+ <> CodeClaude Sonnet 4.6Skipwinasun leams48:40uir-o( 4 spaces...
|
10778
|
|
10781
|
214
|
0
|
2026-04-14T08:58:50.085145+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157130085_m1.jpg...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityService.php
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-1920847021272450725
|
-5390502312724452628
|
idle
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
10782
|
215
|
0
|
2026-04-14T08:58:51.595540+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157131595_m2.jpg...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityService.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14960937,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.76171875,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"bounds":{"left":0.7796875,"top":0.017361112,"width":0.12109375,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.33632812,"top":0.23819445,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.34765625,"top":0.23680556,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.35625,"top":0.23680556,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.6699219,"top":0.0875,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.6816406,"top":0.0875,"width":0.00859375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.6921875,"top":0.08611111,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.7007812,"top":0.08611111,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.0140625,"top":0.041666668,"width":0.028515626,"height":0.021527778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-1920847021272450725
|
-5390502312724452628
|
idle
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
10783
|
215
|
1
|
2026-04-14T08:58:55.375915+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157135375_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorFV PhpStormFileEditViewNavigateCodeLaravelRefactorFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php(C) InboxEmailBatchRepositon)InboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> D AjReports(J AvatarcalendarD ConferenceD Crm>MImport> MInternalv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© JiminnyDebugCommand.php© AutomatedReportsSendCommand.phpC AutomatedReportsCommand.php© AddLayoutEntities.php© Team.phpAutomaleakeporsserwice.ong© AutomatedReportsRepository.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpCrealeAcuivilyLogqedbvent.ono(C) User?llorActvtvuistener.ono© ActivityLogged.phpc) AutomatedRenorscalloackoerwce.onv© RequestGenerateAskJiminnyReportJob.php x(©) RequestGenerateReportJob.php(C) AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements opublic function handle(1):У3 ^v,258486878889100101102103104105106107110111.112return;ssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &sLogger->warnangtsecr..Luo_Pkeria • Skipped, Saved $36'automatedReportUuid' = $this->reportUvid,1):lecurlin$prompt = $automatedReport->getAskAnythingPrompt();if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask an45'aucomatedkeporcuu1d = schis->reporcuuld,1);recurny$this->reportResult = $reportService->createReportResult(autona tedReport: SautonatedRepontdata: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService::MEDIA_TVF56SactivityIds = $activityService->getActivityIdsForSavedSe& 60savedSearch: SsavedSearch,user: $creator,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs','automatedReportUvid' = $this->reportUvid,'activityCount' => count($activityIds),I);if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {Sthis->failReport@ reason: AutomatedReportResult::REASOI$logger->info(self::LOG_PREFIX .' Not enough activit:'automatedReportUuid' => $this->reportUvid,Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log4 console [EUl= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]console SIAGING© AskJiminnyReportActivityService.php xA console [PROD]© RequestGenerateAskJiminnyReportJobTest.phpN221A Yclass AskJiminnyReportActivityServiceprivate const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function __construct(private readonly ActivitySearch $activitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loccerinuertace "Lodder) 4...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDspubLic tuncuion gecAculvity-asrorsavedsearcneSearch SsavedSearch,user puser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria::createFromRequest(array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),$user->getTimezone()ptilterser = schis-›aculvitysearch->gecunbemandrager1ltersec(scriter1a, suser:$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AsKLiminnxReRQrt] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getId(),'user_id' => $user-›getId(),'activity_count' => count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): arrayf...}j Support Daily • in 3h 2mAL RequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:58:55CascadeFixing ReportControlle• Automated Report N• Automated Report L+D ...3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsauconacedkeporcuuld, actlvicycount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportUuid, activityCountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITIES.4b. Error path (exception):[AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService - the requestParams built from the saved search are not logged (only acalvity count2. RequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate - so if we fail at count check, we never see the payloadIcan add loaaina to expose the apolied filters and the actual activity IDs when the count is low. Want me to addthat?Askino •uestion• What would you like to improve?What would you like to improve?SkipLoo tne aoolee Tters recuestrarams)rrom the saveo searchAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tInc ludedbolLog filters + activity IDs in AskJiminnyReportActivityServiceActually I see that activities in on demand using the same filter returs some activities. Where is it? But in+ <> Code Claude Sonnet 4.6winasun leams48:40uir-o( 4 spaces...
|
NULL
|
-8713278096691389216
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorFV PhpStormFileEditViewNavigateCodeLaravelRefactorFV faVsco.s v#11894 on JY-18909-automated-reports-ask-iminny K vToolsWindowHelpProjectv© DeviceRepository.php© ElasticActivityRepository.pl© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.php(C) InboxEmailBatchRepositon)InboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.php© NotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php® PlaylistActivityRepository.fPlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.php© RoleChangeEventRepositor© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.TaskRepository.php© TeamAiContextRepository.TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.phC) TranscriptionSummarvRep© UserRepository.php© VocabularyRepository.pnp> D Rulesv D Services> [ Activity> D AjReports(J AvatarcalendarD ConferenceD Crm>MImport> MInternalv D Kioskv _ AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsSt© ReportController.php© JiminnyDebugCommand.php© AutomatedReportsSendCommand.phpC AutomatedReportsCommand.php© AddLayoutEntities.php© Team.phpAutomaleakeporsserwice.ong© AutomatedReportsRepository.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpCrealeAcuivilyLogqedbvent.ono(C) User?llorActvtvuistener.ono© ActivityLogged.phpc) AutomatedRenorscalloackoerwce.onv© RequestGenerateAskJiminnyReportJob.php x(©) RequestGenerateReportJob.php(C) AutomatedReportResult.php© AutomatedReport.phpclass RequestGenerateAskJiminnyReportJob implements opublic function handle(1):У3 ^v,258486878889100101102103104105106107110111.112return;ssavedsearcn = pautomatedkeport->gecsavedsearcnohif (SsavedSearch === null) &sLogger->warnangtsecr..Luo_Pkeria • Skipped, Saved $36'automatedReportUuid' = $this->reportUvid,1):lecurlin$prompt = $automatedReport->getAskAnythingPrompt();if ($prompt === null) {$logger->warning(self::LOG_PREFIX . ' Skipped, ask an45'aucomatedkeporcuu1d = schis->reporcuuld,1);recurny$this->reportResult = $reportService->createReportResult(autona tedReport: SautonatedRepontdata: ['status' => AutomatedReportResult::STATUS_DEFAULT,'media_type' => AutomatedReportsService::MEDIA_TVF56SactivityIds = $activityService->getActivityIdsForSavedSe& 60savedSearch: SsavedSearch,user: $creator,):$logger→>info(self::LOG_PREFIX . ' Fetched activity IDs','automatedReportUvid' = $this->reportUvid,'activityCount' => count($activityIds),I);if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {Sthis->failReport@ reason: AutomatedReportResult::REASOI$logger->info(self::LOG_PREFIX .' Not enough activit:'automatedReportUuid' => $this->reportUvid,Windsurf changelog 2.12.21: A new version is available. // View Changelog (today 10:33)= custom.log4 console [EUl= laravel.logA SF [jiminny@localhost]A HS_local [jiminny@localhost]console SIAGING© AskJiminnyReportActivityService.php xA console [PROD]© RequestGenerateAskJiminnyReportJobTest.phpN221A Yclass AskJiminnyReportActivityServiceprivate const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;private const array [ENV_SECRET],ActivityActualDate::PARAM_END_DATE,ActivityUpdatedDate::PARAM_UPDATED_FROM,ActivityUpdatedDate: :PARAM_UPDATED_TO,ClosingPeriodFilter::KEY_START_DATE,ClosingPeriodFilter::KEY_END_DATE,public function __construct(private readonly ActivitySearch $activitySearch,private readonly ElasticActivityRepository $elasticRepository,orvare reaconuy Loccerinuertace "Lodder) 4...3/*** Fetch activity IDs for a saved search, passing its filters as-is to Criteria.* Date filters stored on the saved search are excluded; if no other filters exist,* no date constraint is applied - matching the behaviour of getContextForAskAnythingByFilter.* Oreturn string[] Activity IDspubLic tuncuion gecAculvity-asrorsavedsearcneSearch SsavedSearch,user puser.): array {$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);$criteria = Criteria::createFromRequest(array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),$user->getTimezone()ptilterser = schis-›aculvitysearch->gecunbemandrager1ltersec(scriter1a, suser:$activityIds = $this->elasticRepository->onDemandSearchIds0nly($user, $criteria, $filterSet);$this->logger→>info('[AsKLiminnxReRQrt] Fetched activity IDs for saved search', ['saved_search_id' => $savedSearch->getId(),'user_id' => $user-›getId(),'activity_count' => count($activityIds),1):return $activityIds;private function buildRequestParamsFromSearch(Search $savedSearch, User $user): arrayf...}j Support Daily • in 3h 2mAL RequestGenerateAskJiminnyReportJobTest v100% C•Tue 14 Apr 11:58:55CascadeFixing ReportControlle• Automated Report N• Automated Report L+D ...3. Activity fetch — [AskJiminnyReport] (from AskJiminnyReportActivityService)[AskJiminnyReport] Fetched activity IDs for saved searchSavea search lo user lo aculvity countunen immealalely aner in tne od[AskJiminnyReport:Generatel Fetched activity IDsauconacedkeporcuuld, actlvicycount4a. Failure path (< 1 activity):LAskJiminnyReport:Generatel Not enough activities, skippecautomatedReportUuid, activityCountThe AutomatedReportResult gets status=failed, reason=REASON_NOT_ENOUGH_ACTIVITIES.4b. Error path (exception):[AskJiminnyReport:Generatel ErrorautomatedReportUuid, reportUuid, code, messageWhat's missing for debuggingThe logs tell you count but not which filters were applied from the saved search. When a report fails with 0activities, you can't see why - what the saved search filters were, what date range was used, or what requestParams were bulltTwo gaps:1. AskJiminnyReportActivityService - the requestParams built from the saved search are not logged (only acalvity count2. RequestGenerateAskJiminnyReportJob - payload is only logged at "Request sent" (line 132-136), which isafter the activity count gate - so if we fail at count check, we never see the payloadIcan add loaaina to expose the apolied filters and the actual activity IDs when the count is low. Want me to addthat?Askino •uestion• What would you like to improve?What would you like to improve?SkipLoo tne aoolee Tters recuestrarams)rrom the saveo searchAdd filter params to the existing log in AskJiminnyReportActivityService so you can see exactly what filters wereusea wnen u acuvilles are returneeLog actual activity IDs when count is lowAlso log the activity IDs themselves (not just the count) so you can inspect which specific calls were or weren'tInc ludedbolLog filters + activity IDs in AskJiminnyReportActivityServiceActually I see that activities in on demand using the same filter returs some activities. Where is it? But in+ <> Code Claude Sonnet 4.6winasun leams48:40uir-o( 4 spaces...
|
10782
|
|
10784
|
214
|
1
|
2026-04-14T08:58:56.331940+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157136331_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
+SlackEDHomeDMSActivityFilesLater..•More+FileEditV +SlackEDHomeDMSActivityFilesLater..•More+FileEditViewGoHistoryWindowHelp> 0Jiminny ...# Starredplatform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea Dimitravo→Search Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h 2 m100% C48Tue 14 Apr 11:58:56Fuune 4Today ~New...
|
NULL
|
-5457201551565812292
|
NULL
|
click
|
ocr
|
NULL
|
+SlackEDHomeDMSActivityFilesLater..•More+FileEditV +SlackEDHomeDMSActivityFilesLater..•More+FileEditViewGoHistoryWindowHelp> 0Jiminny ...# Starredplatform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea Dimitravo→Search Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h 2 m100% C48Tue 14 Apr 11:58:56Fuune 4Today ~New...
|
10781
|
|
10785
|
215
|
2
|
2026-04-14T08:58:57.814599+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157137814_m2.jpg...
|
PhpStorm
|
faVsco.js – AskJiminnyReportActivityService.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14960937,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny, but local branch is out of sync with remote","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.76171875,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"RequestGenerateAskJiminnyReportJobTest","depth":6,"bounds":{"left":0.7796875,"top":0.017361112,"width":0.12109375,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'RequestGenerateAskJiminnyReportJobTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.33632812,"top":0.23819445,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.34765625,"top":0.23680556,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.35625,"top":0.23680556,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Jobs\\AutomatedReports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Jiminny\\Component\\ProphetAi\\Exceptions\\ProphetException;\nuse Jiminny\\Component\\ProphetAi\\ProphetClient;\nuse Jiminny\\Component\\Queue\\Constants;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AskJiminnyReportActivityService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique\n{\n use InteractsWithQueue;\n use Queueable;\n\n private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';\n\n private const int MIN_ACTIVITIES_COUNT = 1;\n\n public int $tries = 2;\n\n private ?AutomatedReportResult $reportResult = null;\n\n public function __construct(private readonly string $reportUuid)\n {\n $this->onQueue(Constants::QUEUE_ANALYTICS);\n }\n\n public function uniqueId(): string\n {\n return $this->reportUuid;\n }\n\n public function handle(\n AutomatedReportsService $reportService,\n AskJiminnyReportActivityService $activityService,\n ProphetClient $prophetClient,\n LoggerInterface $logger,\n ): void {\n $logger->info(self::LOG_PREFIX . ' Started', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n try {\n $automatedReport = $reportService->getReport($this->reportUuid);\n\n if (! $this->validateReport($automatedReport, $logger)) {\n return;\n }\n\n $creator = $automatedReport->getCreator();\n if ($creator === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $savedSearch = $automatedReport->getSavedSearch();\n if ($savedSearch === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $prompt = $automatedReport->getAskAnythingPrompt();\n if ($prompt === null) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return;\n }\n\n $this->reportResult = $reportService->createReportResult(\n automatedReport: $automatedReport,\n data: [\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n 'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,\n ]\n );\n\n $activityIds = $activityService->getActivityIdsForSavedSearch(\n savedSearch: $savedSearch,\n user: $creator,\n );\n\n $logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {\n $this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);\n\n $logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [\n 'automatedReportUuid' => $this->reportUuid,\n 'activityCount' => count($activityIds),\n ]);\n\n return;\n }\n\n $payload = $reportService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $this->reportResult,\n activityIds: $activityIds,\n );\n\n $this->reportResult->update([\n 'name' => $reportService->getReportFileName($this->reportResult),\n 'payload' => $payload,\n 'status' => AutomatedReportResult::STATUS_REQUESTED,\n 'requested_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n $logger->info(self::LOG_PREFIX . ' Request sent', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult->getUuid(),\n 'payload' => $payload,\n ]);\n\n $response = $prophetClient->sendRequest(\n endpoint: ProphetClient::ASK_JIMINNY_REPORT,\n requestArray: $payload,\n );\n\n $logger->info(self::LOG_PREFIX . ' Response received', [\n 'response' => $response->getContent(),\n ]);\n } catch (Throwable $exception) {\n $reason = $exception instanceof ProphetException\n ? AutomatedReportResult::REASON_PROPHET_API_ERROR\n : AutomatedReportResult::REASON_DEFAULT;\n\n $this->failReport($reason);\n\n $logger->error(self::LOG_PREFIX . ' Error', [\n 'automatedReportUuid' => $this->reportUuid,\n 'reportUuid' => $this->reportResult?->getUuid(),\n 'code' => $exception->getCode(),\n 'message' => $exception->getMessage(),\n ]);\n\n if ($this->attempts() < $this->tries) {\n $logger->info(self::LOG_PREFIX . ' Retry scheduled', [\n 'attempts' => $this->attempts(),\n ]);\n\n $this->release(30);\n } else {\n $this->fail($exception);\n }\n }\n }\n\n private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool\n {\n if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {\n $logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [\n 'automatedReportUuid' => $this->reportUuid,\n 'type' => $automatedReport->getType(),\n ]);\n\n return false;\n }\n\n if (! $automatedReport->getStatus()) {\n $logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {\n $logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [\n 'automatedReportUuid' => $this->reportUuid,\n ]);\n\n return false;\n }\n\n return true;\n }\n\n private function failReport(int $reason): void\n {\n $this->reportResult?->update([\n 'status' => AutomatedReportResult::STATUS_FAILED,\n 'reason' => $reason,\n ]);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.6699219,"top":0.0875,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.6816406,"top":0.0875,"width":0.00859375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.6921875,"top":0.08611111,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.7007812,"top":0.08611111,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityActualDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\ActivityUpdatedDate;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\DealInsights\\ClosingPeriodFilter;\nuse Jiminny\\Component\\ActivitySearch\\Service\\ActivitySearch;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\ElasticActivityRepository;\nuse Jiminny\\VO\\Repository\\OnDemandActivitySearch\\Criteria;\nuse Psr\\Log\\LoggerInterface;\n\nclass AskJiminnyReportActivityService\n{\n private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;\n\n private const array DATE_FILTER_KEYS = [\n ActivityActualDate::PARAM_START_DATE,\n ActivityActualDate::PARAM_END_DATE,\n ActivityUpdatedDate::PARAM_UPDATED_FROM,\n ActivityUpdatedDate::PARAM_UPDATED_TO,\n ClosingPeriodFilter::KEY_START_DATE,\n ClosingPeriodFilter::KEY_END_DATE,\n ];\n\n public function __construct(\n private readonly ActivitySearch $activitySearch,\n private readonly ElasticActivityRepository $elasticRepository,\n private readonly LoggerInterface $logger,\n ) {\n }\n\n /**\n * Fetch activity IDs for a saved search, passing its filters as-is to Criteria.\n * Date filters stored on the saved search are excluded; if no other filters exist,\n * no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.\n *\n * @return string[] Activity IDs\n */\n public function getActivityIdsForSavedSearch(\n Search $savedSearch,\n User $user,\n ): array {\n $requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);\n\n $criteria = Criteria::createFromRequest(\n array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),\n $user->getTimezone()\n );\n\n $filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);\n\n $activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);\n\n $this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [\n 'saved_search_id' => $savedSearch->getId(),\n 'user_id' => $user->getId(),\n 'activity_count' => count($activityIds),\n ]);\n\n return $activityIds;\n }\n\n private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array\n {\n $params = [];\n $arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);\n\n foreach ($savedSearch->getFilters() as $filter) {\n $key = $filter->getFilterProperty();\n $value = $filter->getFilterValue();\n\n if (in_array($key, self::DATE_FILTER_KEYS, true)) {\n continue;\n }\n\n if (isset($params[$key])) {\n $params[$key][] = $value;\n } elseif (in_array($key, $arrayFilterKeys, true)) {\n $params[$key] = [$value];\n } else {\n $params[$key] = $value;\n }\n }\n\n return $params;\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.0140625,"top":0.041666668,"width":0.028515626,"height":0.021527778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-1920847021272450725
|
-5390502312724452628
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
RequestGenerateAskJiminnyReportJobTest
Run 'RequestGenerateAskJiminnyReportJobTest'
Debug 'RequestGenerateAskJiminnyReportJobTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Jobs\AutomatedReports;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Jiminny\Component\ProphetAi\Exceptions\ProphetException;
use Jiminny\Component\ProphetAi\ProphetClient;
use Jiminny\Component\Queue\Constants;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Kiosk\AutomatedReports\AskJiminnyReportActivityService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class RequestGenerateAskJiminnyReportJob implements ShouldQueue, ShouldBeUnique
{
use InteractsWithQueue;
use Queueable;
private const string LOG_PREFIX = '[AskJiminnyReport:Generate]';
private const int MIN_ACTIVITIES_COUNT = 1;
public int $tries = 2;
private ?AutomatedReportResult $reportResult = null;
public function __construct(private readonly string $reportUuid)
{
$this->onQueue(Constants::QUEUE_ANALYTICS);
}
public function uniqueId(): string
{
return $this->reportUuid;
}
public function handle(
AutomatedReportsService $reportService,
AskJiminnyReportActivityService $activityService,
ProphetClient $prophetClient,
LoggerInterface $logger,
): void {
$logger->info(self::LOG_PREFIX . ' Started', [
'automatedReportUuid' => $this->reportUuid,
]);
try {
$automatedReport = $reportService->getReport($this->reportUuid);
if (! $this->validateReport($automatedReport, $logger)) {
return;
}
$creator = $automatedReport->getCreator();
if ($creator === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, report creator not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$savedSearch = $automatedReport->getSavedSearch();
if ($savedSearch === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, saved search not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$prompt = $automatedReport->getAskAnythingPrompt();
if ($prompt === null) {
$logger->warning(self::LOG_PREFIX . ' Skipped, ask anything prompt not found', [
'automatedReportUuid' => $this->reportUuid,
]);
return;
}
$this->reportResult = $reportService->createReportResult(
automatedReport: $automatedReport,
data: [
'status' => AutomatedReportResult::STATUS_DEFAULT,
'media_type' => AutomatedReportsService::MEDIA_TYPE_PDF,
]
);
$activityIds = $activityService->getActivityIdsForSavedSearch(
savedSearch: $savedSearch,
user: $creator,
);
$logger->info(self::LOG_PREFIX . ' Fetched activity IDs', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
if (count($activityIds) < self::MIN_ACTIVITIES_COUNT) {
$this->failReport(AutomatedReportResult::REASON_NOT_ENOUGH_ACTIVITIES);
$logger->info(self::LOG_PREFIX . ' Not enough activities, skipped', [
'automatedReportUuid' => $this->reportUuid,
'activityCount' => count($activityIds),
]);
return;
}
$payload = $reportService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $this->reportResult,
activityIds: $activityIds,
);
$this->reportResult->update([
'name' => $reportService->getReportFileName($this->reportResult),
'payload' => $payload,
'status' => AutomatedReportResult::STATUS_REQUESTED,
'requested_at' => Carbon::now()->toDateTimeString(),
]);
$logger->info(self::LOG_PREFIX . ' Request sent', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult->getUuid(),
'payload' => $payload,
]);
$response = $prophetClient->sendRequest(
endpoint: ProphetClient::ASK_JIMINNY_REPORT,
requestArray: $payload,
);
$logger->info(self::LOG_PREFIX . ' Response received', [
'response' => $response->getContent(),
]);
} catch (Throwable $exception) {
$reason = $exception instanceof ProphetException
? AutomatedReportResult::REASON_PROPHET_API_ERROR
: AutomatedReportResult::REASON_DEFAULT;
$this->failReport($reason);
$logger->error(self::LOG_PREFIX . ' Error', [
'automatedReportUuid' => $this->reportUuid,
'reportUuid' => $this->reportResult?->getUuid(),
'code' => $exception->getCode(),
'message' => $exception->getMessage(),
]);
if ($this->attempts() < $this->tries) {
$logger->info(self::LOG_PREFIX . ' Retry scheduled', [
'attempts' => $this->attempts(),
]);
$this->release(30);
} else {
$this->fail($exception);
}
}
}
private function validateReport(AutomatedReport $automatedReport, LoggerInterface $logger): bool
{
if ($automatedReport->getType() !== AutomatedReportsService::TYPE_ASK_JIMINNY) {
$logger->warning(self::LOG_PREFIX . ' Skipped, not an ask_jiminny report', [
'automatedReportUuid' => $this->reportUuid,
'type' => $automatedReport->getType(),
]);
return false;
}
if (! $automatedReport->getStatus()) {
$logger->info(self::LOG_PREFIX . ' Skipped, report is not active', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
if ($automatedReport->getTeam()->getStatus() !== Team::STATUS_ACTIVE) {
$logger->info(self::LOG_PREFIX . ' Skipped, team is inactive', [
'automatedReportUuid' => $this->reportUuid,
]);
return false;
}
return true;
}
private function failReport(int $reason): void
{
$this->reportResult?->update([
'status' => AutomatedReportResult::STATUS_FAILED,
'reason' => $reason,
]);
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
2
1
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Services\Kiosk\AutomatedReports;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityActualDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\ActivityUpdatedDate;
use Jiminny\Component\ActivitySearch\FilterDefinition\DealInsights\ClosingPeriodFilter;
use Jiminny\Component\ActivitySearch\Service\ActivitySearch;
use Jiminny\Models\Activity\Search;
use Jiminny\Models\User;
use Jiminny\Repositories\ElasticActivityRepository;
use Jiminny\VO\Repository\OnDemandActivitySearch\Criteria;
use Psr\Log\LoggerInterface;
class AskJiminnyReportActivityService
{
private const int DEFAULT_TOP_ACTIVITIES_COUNT = 100;
private const array DATE_FILTER_KEYS = [
ActivityActualDate::PARAM_START_DATE,
ActivityActualDate::PARAM_END_DATE,
ActivityUpdatedDate::PARAM_UPDATED_FROM,
ActivityUpdatedDate::PARAM_UPDATED_TO,
ClosingPeriodFilter::KEY_START_DATE,
ClosingPeriodFilter::KEY_END_DATE,
];
public function __construct(
private readonly ActivitySearch $activitySearch,
private readonly ElasticActivityRepository $elasticRepository,
private readonly LoggerInterface $logger,
) {
}
/**
* Fetch activity IDs for a saved search, passing its filters as-is to Criteria.
* Date filters stored on the saved search are excluded; if no other filters exist,
* no date constraint is applied — matching the behaviour of getContextForAskAnythingByFilter.
*
* @return string[] Activity IDs
*/
public function getActivityIdsForSavedSearch(
Search $savedSearch,
User $user,
): array {
$requestParams = $this->buildRequestParamsFromSearch($savedSearch, $user);
$criteria = Criteria::createFromRequest(
array_merge($requestParams, ['limit' => self::DEFAULT_TOP_ACTIVITIES_COUNT, 'page' => 1]),
$user->getTimezone()
);
$filterSet = $this->activitySearch->getOnDemandPageFilterSet($criteria, $user);
$activityIds = $this->elasticRepository->onDemandSearchIdsOnly($user, $criteria, $filterSet);
$this->logger->info('[AskJiminnyReport] Fetched activity IDs for saved search', [
'saved_search_id' => $savedSearch->getId(),
'user_id' => $user->getId(),
'activity_count' => count($activityIds),
]);
return $activityIds;
}
private function buildRequestParamsFromSearch(Search $savedSearch, User $user): array
{
$params = [];
$arrayFilterKeys = $this->activitySearch->getArrayFilterKeys($user);
foreach ($savedSearch->getFilters() as $filter) {
$key = $filter->getFilterProperty();
$value = $filter->getFilterValue();
if (in_array($key, self::DATE_FILTER_KEYS, true)) {
continue;
}
if (isset($params[$key])) {
$params[$key][] = $value;
} elseif (in_array($key, $arrayFilterKeys, true)) {
$params[$key] = [$value];
} else {
$params[$key] = $value;
}
}
return $params;
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
10786
|
214
|
2
|
2026-04-14T08:58:57.787459+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776157137787_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
+SlackEDHomeDMSActivityFilesLater..•More+FileEditV +SlackEDHomeDMSActivityFilesLater..•More+FileEditViewGoHistoryWindowHelp> 0Jiminny ...# Starredplatform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea Dimitravo→Search Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h 2 m100% C48Tue 14 Apr 11:58:57Fuune 4Today ~New...
|
NULL
|
-1917788532885685893
|
NULL
|
click
|
ocr
|
NULL
|
+SlackEDHomeDMSActivityFilesLater..•More+FileEditV +SlackEDHomeDMSActivityFilesLater..•More+FileEditViewGoHistoryWindowHelp> 0Jiminny ...# Starredplatform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi…..• Direct messagesAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...R. Adelina PetrovaO. Calea Dimitravo→Search Jiminny IncAneliya Angelova, Nikolay Yankov, Steliyan GeorgievMessagesAdd canvas+Phooa да тестоan АРусротораmone nunpomопределен когато тествамеNikolay Yankov 10:41 AMможеш ли да я рьннеш ти командатаLukas Kovalik 10:43 AMдаNikolay Yankov 10:45 AMпиши кат оя рьннешLukas Kovalik 10:52 AMзабавих се че ми се разбазикаха settings за средипуснах и мина и fail-наима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаMessage Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev+AaSupport Daily - in 3 h 2 m100% C48Tue 14 Apr 11:58:57Fuune 4Today ~New...
|
NULL
|