Skip to content

Commit

Permalink
Serialize tenant to string instead of GlobalID (#326)
Browse files Browse the repository at this point in the history
Sidekiq best practices prefer JSON types and
GlobalID::Locator.locate works with the string
representation of GlobalID (which is a unique URI)

Co-authored-by: Ziad Sawalha <[email protected]>
  • Loading branch information
ziadsawalha and Ziad Sawalha authored Dec 13, 2023
1 parent 572469d commit 5ef6d28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/acts_as_tenant/active_job_extensions.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ActsAsTenant
module ActiveJobExtensions
def serialize
super.merge("current_tenant" => ActsAsTenant.current_tenant&.to_global_id)
super.merge("current_tenant" => ActsAsTenant.current_tenant&.to_global_id&.to_s)
end

def deserialize(job_data)
Expand Down

0 comments on commit 5ef6d28

Please sign in to comment.