operationable 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dda1a088a4f86bd2c423a35b629bec4ace91cc01
|
4
|
+
data.tar.gz: 70fdcb19c888dd5fcc19165d068e06907b341ee5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e15a0b221702498945f2a0eca3f852b97fdc9e3660df544842ba007dc985dbe1bbbe16df8cd54d52d1ae5732bd94038b9b1afed046466b8deb110c4fabb264dd
|
7
|
+
data.tar.gz: 4468c4c3c754aac78032b09b89fd1f544e668a741b9adc93cfe306492dc92f548d2a69cc758110b25ebe725544faa8ae779fbe42d132c000f81c787646b81665
|
@@ -71,7 +71,7 @@ module Operationable
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def working
|
74
|
-
set_status({'status' => Operationable::Persisters::Base::STATUS_WORKING})
|
74
|
+
set_status({'status' => Operationable::Persisters::Base::STATUS_WORKING, attempts: 1})
|
75
75
|
end
|
76
76
|
|
77
77
|
# set the status to 'failed' passing along any additional messages
|
@@ -3,8 +3,15 @@ module Operationable
|
|
3
3
|
module Persisters
|
4
4
|
module Database
|
5
5
|
def self.create(q_options, props)
|
6
|
+
date = Time.zone.now.to_date
|
7
|
+
|
6
8
|
::OperationCallback.create(
|
7
|
-
q_options: q_options,
|
9
|
+
q_options: q_options,
|
10
|
+
props: props,
|
11
|
+
attempts: 0,
|
12
|
+
week: props[:week] || date.cweek,
|
13
|
+
year: props[:year] || date.year,
|
14
|
+
status: Operationable::Persisters::Base::STATUS_INIT
|
8
15
|
)
|
9
16
|
end
|
10
17
|
|
@@ -16,7 +16,7 @@ module Operationable
|
|
16
16
|
|
17
17
|
def store_callback(q_options)
|
18
18
|
op_cb = ::Operationable::Persisters::Database.create(q_options, props)
|
19
|
-
q_options.merge({op_cb_id: op_cb.id})
|
19
|
+
q_options.merge({op_cb_id: op_cb.id})
|
20
20
|
end
|
21
21
|
|
22
22
|
def persist_operation
|
@@ -47,7 +47,7 @@ module Operationable
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def job_sync_execute_method
|
50
|
-
:
|
50
|
+
:perform_later
|
51
51
|
end
|
52
52
|
|
53
53
|
def job_async_execute_method
|