Skip to content

Commit

Permalink
Merge pull request #203 from bensheldon/doc_fix
Browse files Browse the repository at this point in the history
Fix YARD attr_ declarations for documentation
  • Loading branch information
bensheldon authored Jan 22, 2021
2 parents e933358 + 42e997b commit 1fafc13
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
19 changes: 9 additions & 10 deletions lib/good_job/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ class Configuration
# Default number of seconds to preserve jobs for {CLI#cleanup_preserved_jobs}
DEFAULT_CLEANUP_PRESERVED_JOBS_BEFORE_SECONDS_AGO = 24 * 60 * 60

# @!attribute [r] options
# The options that were explicitly set when initializing +Configuration+.
# @return [Hash]
#
# @!attribute [r] env
# The environment from which to read GoodJob's environment variables. By
# default, this is the current process's environment, but it can be set
# to something else in {#initialize}.
# @return [Hash]
attr_reader :options, :env
# The options that were explicitly set when initializing +Configuration+.
# @return [Hash]
attr_reader :options

# The environment from which to read GoodJob's environment variables. By
# default, this is the current process's environment, but it can be set
# to something else in {#initialize}.
# @return [Hash]
attr_reader :env

# @param options [Hash] Any explicitly specified configuration options to
# use. Keys are symbols that match the various methods on this class.
Expand Down
4 changes: 2 additions & 2 deletions lib/good_job/lockable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ module Lockable
# @return [ActiveRecord::Relation]
scope :owns_advisory_locked, -> { joins_advisory_locks.where('"pg_locks"."pid" = pg_backend_pid()') }

# @!attribute [r] create_with_advisory_lock
# @return [Boolean]
# Whether an advisory lock should be acquired in the same transaction
# that created the record.
#
Expand All @@ -107,6 +105,8 @@ module Lockable
# record = MyLockableRecord.create(create_with_advisory_lock: true)
# record.advisory_locked?
# => true
#
# @return [Boolean]
attr_accessor :create_with_advisory_lock

after_create -> { advisory_lock }, if: :create_with_advisory_lock
Expand Down
2 changes: 1 addition & 1 deletion lib/good_job/scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module GoodJob # :nodoc:
# periodically checking for available tasks, executing tasks within a thread,
# and efficiently scaling active threads.
#
# Every scheduler has a single {Performer} that will execute tasks.
# Every scheduler has a single {JobPerformer} that will execute tasks.
# The scheduler is responsible for calling its performer efficiently across threads managed by an instance of +Concurrent::ThreadPoolExecutor+.
# If a performer does not have work, the thread will go to sleep.
# The scheduler maintains an instance of +Concurrent::TimerTask+, which wakes sleeping threads and causes them to check whether the performer has new work.
Expand Down

0 comments on commit 1fafc13

Please sign in to comment.