Skip to content

Commit

Permalink
closes #51
Browse files Browse the repository at this point in the history
  • Loading branch information
bnomei committed Sep 28, 2021
1 parent ed920fb commit 480551a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
12 changes: 10 additions & 2 deletions classes/Janitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ public function findJob(string $name)
public function jobFromCallable($job, array $data): array
{
$return = false;
set_time_limit(0);
try {
set_time_limit(0);
} catch (\Exception $ex) {
// ignore
}

try {
$return = $job(
Expand Down Expand Up @@ -162,7 +166,11 @@ public function jobFromClass(string $job, array $data): array
);

if (method_exists($object, 'job')) {
set_time_limit(0);
try {
set_time_limit(0);
} catch (\Exception $ex) {
// ignore
}
return $object->job();
}
return [
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bnomei/kirby3-janitor",
"type": "kirby-plugin",
"version": "2.10.0",
"version": "2.10.1",
"license": "MIT",
"description": "Kirby 3 Plugin for running jobs like cleaning the cache from within the Panel, PHP code or a cronjob",
"authors": [
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 480551a

Please sign in to comment.