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

Fix YARD attr_ declarations for documentation #203

Merged
merged 1 commit into from
Jan 22, 2021
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
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