lib/mysql_mutex.rb in distributed_mutex-1.1.3 vs lib/mysql_mutex.rb in distributed_mutex-1.1.4
- old
+ new
@@ -33,11 +33,11 @@
if defined?(Rails)
Rails.logger.debug("MySQLMutex: GET_LOCK=#{get_lock}")
end
- if '1' == get_lock
+ if 1 == get_lock.to_i
increment_thread_lock_count
true
else
false
end
@@ -53,10 +53,10 @@
if defined?(Rails)
Rails.logger.debug("MySQLMutex: RELEASE_LOCK=#{lock_release}")
end
- if '1' == lock_release
+ if 1 == lock_release.to_i
decrement_thread_lock_count
true
else
false
end