From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

use Dancer ':syntax';
register_worker({ phase => 'main' }, sub {
my ($job, $workerconf) = @_;
my $extra = $job->extra;
if ($extra) {
system('psql', '-c', $extra);
}
else {
system('psql');
}
return Status->done('psql session closed.');
});
true;