forked from gnufied/backgroundrb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
408 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module BackgrounDRb | ||
class Result | ||
def initialize results | ||
@results = resuls | ||
end | ||
|
||
def async_response? | ||
!(@results[:result] == true) | ||
end | ||
|
||
def sync_response? | ||
(@results[:result] == true) | ||
end | ||
|
||
def error? | ||
!(@results[:result_flag] == "ok") | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
Hi, | ||
|
||
BackgrounDRb 1.2 is being unleashed. | ||
|
||
* New features: | ||
|
||
** Exceptions/errors are now popped out at the earliest moment | ||
in the client side itself. For example: | ||
|
||
>> MiddleMan.worker(:foo_worker).async_bar(:args => {:age => 10}) | ||
BackgrounDRb::RemoteWorkerError: BackgrounDRb::RemoteWorkerError | ||
|
||
Above exception is thrown because remote worker doesn't have method | ||
"bar" defined on it. | ||
|
||
Similarly: | ||
|
||
>> MiddleMan.worker(:foo_worker).checksum(:args => {:age => "lolz"}) | ||
BackgrounDRb::RemoteWorkerError: BackgrounDRb::RemoteWorkerError | ||
|
||
Above exception is thrown because remote worker's checksum method | ||
expects an integer as an argument. | ||
|
||
For asynchronous method calls, BackgrounDRb doesn't check if method | ||
ran successfully, it only checks existence of methods on remote | ||
worker. For sync method calls it checks if method ran successfully | ||
or not. | ||
|
||
** Its possible to have per worker configuration options now. | ||
|
||
* Bug Fixes | ||
|
||
** Much better error/exception handling. Rogue worker methods shouldn't | ||
crash the worker now. All the unhandled exceptions and dispatch | ||
errors can be found in debug log file. | ||
|
||
** Fixes for postgres db with persistent job queues. | ||
|
||
** Switched to lightweight Queue implementation for tasks enqueued | ||
to thread pool. | ||
|
||
** Fixes for database dropped connections while running tasks from | ||
persistent queues. | ||
|
||
** Fixes for newer Rails versions. | ||
|
||
** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.