Skip to content

Commit 52c1ab9

Browse files
author
Rozehnal, Pavel
committed
[WEB-8005] - Update accrual logic
- added support for runTask method which can decorate the origin one in many existing classes
1 parent ccd826c commit 52c1ab9

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.svn
2-
*.bak
2+
*.bak
3+
.idea/*

Console/Command/QueueShell.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,12 @@ public function runworker() {
182182
$this->QueuedTask->requeueJob($data['id'], $this->getTaskConf($taskname, 'timeout'));
183183
$this->out('Job could not be run, requeued.');
184184
} else {
185-
$return = $this->{$taskname}->run($jobData);
185+
if (method_exists($this->{$taskname}, 'runTask')) {
186+
$return = $this->{$taskname}->runTask($jobData);
187+
} else {
188+
$return = $this->{$taskname}->run($jobData);
189+
}
190+
186191
if ($return == true) {
187192
$this->QueuedTask->markJobDone($data['id']);
188193
$this->out('Job Finished.');

0 commit comments

Comments
 (0)