-
-
-
system/libraries/spwn/class.resquejobdispatcher.inc.php (Diff revision 1) missing destruction of $resque
-
system/libraries/spwn/class.resquejobdispatcher.inc.php (Diff revision 1) I'd rather have $queue a default queue than NULL
-
tests/system/libraries/spwn/class.resquejobdispatcher.dispatch.test.php (Diff revision 1) Two methods don't really warrant a new test file. Just have one test file for the whole class, same as we do for various other small classes.
-
tests/system/libraries/spwn/class.resquejobdispatcher.test.php (Diff revision 1) That's a ReflectionClass
-
tests/system/libraries/spwn/class.resquejobdispatcher.test.php (Diff revision 1) I don't see why this is necessary. The Mock should have already replaced this with an empty method block...
-
tests/system/libraries/spwn/class.resquejobdispatcher.test.php (Diff revision 1) that's a bit long of a variable name, no?
[Spwn] add Resque job dispatcher to lunr
Review Request #25 — Created Dec. 18, 2012 and submitted
Information | |
---|---|
olivier | |
Lunr | |
https://github.com/owizen/lunr/tree/dispatcher | |
Reviewers | |
lunr | |
Add a backgroundjob dispatcher to lunr for Resque
Unit test, 100% covering
- 1
- 0
- 28
- 1
- 30
Description | From | Last Updated |
---|---|---|
Dude, this is still an incompatible method signature... How often do I have to mention this? | pprkut |
Change Summary:
change made according to review. Introduce mock class for resque
Diff: |
Revision 2 (+229) |
---|
-
-
system/libraries/spwn/class.resquejobdispatcher.inc.php (Diff revision 2) That needs better documentation
-
-
-
tests/mocks/libraries/spwn/class.resque.mock.php (Diff revision 2) what would that be in the case of a CliBackgroundJob?
-
tests/mocks/libraries/spwn/class.resque.mock.php (Diff revision 2) This signature is incompatible to: public static function enqueue($queue, $class, $args = null, $trackStatus = false)
-
tests/system/libraries/spwn/class.resquejobdispatcher.test.php (Diff revision 2) don't pass the mock without keeping a reference
-
tests/system/libraries/spwn/class.resquejobdispatcher.test.php (Diff revision 2) reuse the reference
-
tests/system/libraries/spwn/class.resquejobdispatcher.test.php (Diff revision 2) reuse the existing reference
Change Summary:
Change made according to review. Method get_result added in interface for getting the result of the dispatching.
Diff: |
Revision 3 (+272) |
---|
-
-
-
system/libraries/spwn/class.resquejobdispatcher.inc.php (Diff revision 3) I'm not sure this is the correct naming here. Cli won't have that functionality, but for Resque it's wrong since you just get the Job ID not the result.
-
-
-
Change Summary:
rename get_result to get_job_id in interface and resque job dispatcher unit test updated to cover the implementation of that method
Diff: |
Revision 4 (+292) |
---|
-
-
tests/mocks/libraries/spwn/class.resque.mock.php (Diff revision 4) Dude, this is still an incompatible method signature... How often do I have to mention this?
Change Summary:
Changed resque mock enqueue method signature.
-
-
-
src/Lunr/Spwn/ResqueJobDispatcher.php (Diff revision 6) Thought: How about making those setters? Most of the time you probably dispatch similar jobs in a loop, then setting the queue and track status once makes for an easier interface than having to pass it all the time. What do you think?
-
-
-
src/Lunr/Spwn/Tests/ResqueJobDispatcherTest.php (Diff revision 6) I don't like that. Please do that explicitely in the tests
Change Summary:
Correction made from review, code style check passed. Remains the setters question for trackStatus and queue
Diff: |
Revision 7 (+239) |
---|
Change Summary:
add setters for track status and queue properties, unit tests updated, code styleok once this is fixed, the setters could be part of the job dispatcher interface
Diff: |
Revision 8 (+471) |
---|
-
-
src/Lunr/Spwn/Tests/ResqueJobDispatcherTest.php (Diff revisions 7 - 8) what's the difference between these that you have to test all of them?
-
-
-
-