Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug preventing Amber from booting #497

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/granite/connection_management.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ module Granite::ConnectionManagement
# database connection for read operations
# all models use this value. Change it
# to change it in all Granite::Base models.
class_property connection_switch_wait_period : Int64 = Granite::Connections.connection_switch_wait_period
class_property connection_switch_wait_period : Int32 = Granite::Connections.connection_switch_wait_period
@@last_write_time = Time.monotonic

class_property current_adapter : Granite::Adapter::Base?
class_property reader_adapter : Granite::Adapter::Base = Granite::Connections.first_reader
class_property writer_adapter : Granite::Adapter::Base = Granite::Connections.first_writer
class_property reader_adapter : Granite::Adapter::Base?
class_property writer_adapter : Granite::Adapter::Base?

def self.last_write_time
@@last_write_time
Expand Down
2 changes: 1 addition & 1 deletion src/granite/connections.cr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Granite
class Connections
class_property connection_switch_wait_period : Int64 = 2000
class_property connection_switch_wait_period : Int32 = 2000
class_getter registered_connections = [] of {writer: Granite::Adapter::Base, reader: Granite::Adapter::Base}

# Registers the given *adapter*. Raises if an adapter with the same name has already been registered.
Expand Down
Loading