Closed zemkogabor closed 7 months ago
I also noticed that I also get an error when listing:
Code:
...
public function execute(InputInterface $input, OutputInterface $output): int
{
$schedules = $this->scheduleClient->listSchedules();
if (count($schedules->getPageItems()) === 0) {
$output->writeln('<fg=red>No Schedules found</fg=red>');
return self::FAILURE;
}
$rows = [];
foreach ($schedules as $schedule) {
$previous = count($schedule->info->recentActions) === 0
? null
: $schedule->info->recentActions[array_key_last($schedule->info->recentActions)];
$rows[] = [
$schedule->scheduleId,
$schedule->info->workflowType->name,
number_format((float)$schedule->info->futureActionTimes[0]
->diff(new DateTimeImmutable())->format('%s.%F'), 3) . 's',
$previous === null
? 'N/A'
: number_format((float)$previous->actualTime
->diff(new DateTimeImmutable())->format('%s.%F'), 3) . 's',
];
}
(new Table($output))
->setHeaderTitle('Recent Actions')
->setHeaders(['ID', 'WF Type', 'Next run in', 'Last run'])
->setRows($rows)
->render();
return self::SUCCESS;
}
...
Do you use PHP protobuf extension? Or composer package only?
Yes, I use extension (no protobuf composer package). Here is part of my Dockerfile:
# Protobuf
ENV PROTOBUF_VERSION "3.25.1"
RUN pecl channel-update pecl.php.net
RUN pecl install protobuf-${PROTOBUF_VERSION} grpc \
&& docker-php-ext-enable protobuf grpc
# Roadrunner binary
# https://roadrunner.dev/docs/app-server-images/current/en
COPY --from=ghcr.io/roadrunner-server/roadrunner:2023.3.8 /usr/bin/rr /usr/local/bin/rr
RUN chmod +x /usr/local/bin/rr
What are you really trying to do?
Create scheduled workflow without start and end time.
Describe the bug
If startTime and endTime not declared in Schedule spec, I got this error:
Minimal Reproduction
Working code:
TypeError Exception:
If I unset these keys in the V1/ScheduleSpec file, the schedule is successful created:
Environment/Versions