chrono_forge 0.7.0.rc1 → 0.8.0

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
  SHA256:
3
- metadata.gz: 249a16358802f143b744130ac2807cea606fe1c3d4c4f2fc20b6ab83e4aaba9b
4
- data.tar.gz: 4fe9d09279388146179f6f636f4b9a0601aaa758e7d2c0fccf035b278d7e9288
3
+ metadata.gz: 518b82abfe5b0061b385b4293ae955eb6a188c1e3bf76f4763e5f03e13359771
4
+ data.tar.gz: ca59809649371db8eaa1e6eb8579f7bc34d5471f19f065e908b9585b9fb0e2fb
5
5
  SHA512:
6
- metadata.gz: 7fc5b49ed0beb6082b98a16e8ca764d6430a17a67e717e48350b416e6d2a5482cc05a0bc1f97a5b274c4f232eadfc3b1f9d8298b3e6bf05b9a85cfcd5e33dd41
7
- data.tar.gz: 5b6a0c8ab5147b689563f2ab7516e78a93159437d10c8adab6de91a851abb1259e93a26413aa17617f17809ca30aec5ac14583bc51d9f7461de3848967a70f3a
6
+ metadata.gz: ae7de522ddbaa15625fa38109a63e28167b1831e635e78d95f2f9c0e9d6ff8117418a972dfbeda1555f2059c4d33b5faa286bbd1a07132c6a157c71f3194839d
7
+ data.tar.gz: ee9a38551628d68e0efb02ad0b4d6f42d97fec92d776e8a394a64c5b05efcac9608cd9f0bb6897b43c8195b31a17e1cb9fb475e44b67a69cda94e898fc59f7f7
data/README.md CHANGED
@@ -99,7 +99,7 @@ class OrderProcessingWorkflow < ApplicationJob
99
99
  durably_execute :process_order
100
100
 
101
101
  # Final steps
102
- complete_order
102
+ durably_execute :complete_order
103
103
  end
104
104
 
105
105
  private
@@ -207,13 +207,13 @@ wait 1.day, "daily_batch_interval"
207
207
 
208
208
  # Complex workflow with multiple waits
209
209
  def user_onboarding_flow
210
- send_welcome_email
210
+ durably_execute :send_welcome_email
211
211
  wait 1.hour, "welcome_delay"
212
212
 
213
- send_tutorial_email
213
+ durably_execute :send_tutorial_email
214
214
  wait 2.days, "tutorial_followup"
215
215
 
216
- send_feedback_request
216
+ durably_execute :send_feedback_request
217
217
  end
218
218
  ```
219
219
 
@@ -237,8 +237,6 @@ wait_until :database_migration_complete?,
237
237
  def third_party_service_ready?
238
238
  response = HTTParty.get("https://api.example.com/health")
239
239
  response.code == 200 && response.body.include?("healthy")
240
- rescue Net::TimeoutError, Net::HTTPClientException
241
- false # Will be retried at next check interval
242
240
  end
243
241
 
244
242
  wait_until :third_party_service_ready?,
@@ -219,14 +219,6 @@ module ChronoForge
219
219
  completed_at: Time.current
220
220
  )
221
221
 
222
- # Update coordination log with successful execution and schedule next
223
- coordination_log.update!(
224
- metadata: coordination_log.metadata.merge(
225
- "last_execution_at" => execution_time.iso8601
226
- ),
227
- last_executed_at: Time.current
228
- )
229
-
230
222
  schedule_next_execution_after_completion(coordination_log, execution_time, every)
231
223
  rescue HaltExecutionFlow
232
224
  raise
@@ -278,6 +270,14 @@ module ChronoForge
278
270
  end
279
271
 
280
272
  def schedule_next_execution_after_completion(coordination_log, current_execution_time, every)
273
+ # Update coordination log and schedule next
274
+ coordination_log.update!(
275
+ metadata: coordination_log.metadata.merge(
276
+ "last_execution_at" => current_execution_time.iso8601
277
+ ),
278
+ last_executed_at: Time.current
279
+ )
280
+
281
281
  # Calculate next execution time
282
282
  next_execution_time = current_execution_time + every
283
283
 
@@ -37,8 +37,6 @@ module ChronoForge
37
37
  # def third_party_service_ready?
38
38
  # response = HTTParty.get("https://api.example.com/health")
39
39
  # response.code == 200 && response.body.include?("healthy")
40
- # rescue Net::TimeoutError
41
- # false # Will be retried at next check interval
42
40
  # end
43
41
  #
44
42
  # wait_until :third_party_service_ready?,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ChronoForge
4
- VERSION = "0.7.0.rc1"
4
+ VERSION = "0.8.0"
5
5
  end
@@ -30,7 +30,7 @@ class InstallChronoForge < ActiveRecord::Migration[7.1]
30
30
  create_table :chrono_forge_execution_logs, id: primary_key_type do |t|
31
31
  t.references :workflow, null: false,
32
32
  foreign_key: {to_table: :chrono_forge_workflows},
33
- type: reference_type
33
+ type: primary_key_type
34
34
 
35
35
  t.string :step_name, null: false
36
36
  t.integer :attempts, null: false, default: 0
@@ -55,7 +55,7 @@ class InstallChronoForge < ActiveRecord::Migration[7.1]
55
55
  create_table :chrono_forge_error_logs, id: primary_key_type do |t|
56
56
  t.references :workflow, null: false,
57
57
  foreign_key: {to_table: :chrono_forge_workflows},
58
- type: reference_type
58
+ type: primary_key_type
59
59
 
60
60
  t.string :error_class
61
61
  t.text :error_message
@@ -97,8 +97,4 @@ class InstallChronoForge < ActiveRecord::Migration[7.1]
97
97
  # Default to traditional integer keys
98
98
  :bigint
99
99
  end
100
-
101
- def reference_type
102
- (primary_key_type == :uuid) ? :uuid : nil
103
- end
104
100
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chrono_forge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0.rc1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-06-01 00:00:00.000000000 Z
11
+ date: 2025-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -224,9 +224,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
224
224
  version: 3.2.2
225
225
  required_rubygems_version: !ruby/object:Gem::Requirement
226
226
  requirements:
227
- - - ">"
227
+ - - ">="
228
228
  - !ruby/object:Gem::Version
229
- version: 1.3.1
229
+ version: '0'
230
230
  requirements: []
231
231
  rubygems_version: 3.4.10
232
232
  signing_key: