Persistence#19
Conversation
|
@iloveitaly could you please rebase this on the master branch? |
|
@mtylty slammed with other work at the moment, I'll get to this within 1-2 weeks. |
|
@iloveitaly Is the goal of this PR to provide a Translation table to keep source and destination ids of record ? Like my warehouse product ID is |
|
It is probably more a feature to persist an unfinished job !? Like if one integration is down, it will retry to send the response until it works? |
Not exactly. Here's some more information about the goals here
[0] def perform?
type == 'shipment' && self.payload_state == :new
end |
For retrying jobs via the console, and later through the GUI
d2b3e8c to
3386d1b
Compare
|
|
||
| database_path = File.expand_path('../../../tmp/cangaroo_test.sqlite3', __FILE__) | ||
| ENV['DATABASE_URL'] = "sqlite3://#{database_path}" | ||
| ENV['DATABASE_URL'] = "postgres:///cangaroo_test" |
There was a problem hiding this comment.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
|
@mtylty Rebased this PR on master, but it's dependent on the other smaller PRs I have open. Those will need to be merged before this passes. Looking forward to hearing your thoughts! |
|
An example of what the def perform?
self.unique_state?
end
def unique_state?
!self.
translation.
related_translations.
map { |t| t.request['status'] }.
uniq.
include? self.payload['status']
end |
|
@AlessioRocco Any thoughts on this? I can rebase this PR if you have time to dig in. |
Initial audit log / persistence implementation.
Dependent PRs:
TODO