diff options
| author | Luke Kanies <luke@puppetlabs.com> | 2010-06-10 20:31:34 -0700 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | 0b95a8528e554df07efe970c9ecfc34535d17c92 (patch) | |
| tree | 42ac163a4ab9497e3fb9f676365c1b3da35c5c7d /lib/puppet/transaction.rb | |
| parent | 4627b8fe11dc14bf42e98b84121b885df73c709e (diff) | |
| download | puppet-0b95a8528e554df07efe970c9ecfc34535d17c92.tar.gz puppet-0b95a8528e554df07efe970c9ecfc34535d17c92.tar.xz puppet-0b95a8528e554df07efe970c9ecfc34535d17c92.zip | |
Working #3139 - scheduling moved to resource harness
We previously had the schedule checking code in Puppet::Type,
but it's more of a transactional function, and in order to
do proper auditing in the transactional area, we need the
cache checking done there. Scheduling is one
of the few functions that actually uses cached data currently.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Diffstat (limited to 'lib/puppet/transaction.rb')
| -rw-r--r-- | lib/puppet/transaction.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/puppet/transaction.rb b/lib/puppet/transaction.rb index e57fe5648..d2dbf7a1c 100644 --- a/lib/puppet/transaction.rb +++ b/lib/puppet/transaction.rb @@ -318,12 +318,11 @@ class Puppet::Transaction # Is the resource currently scheduled? def scheduled?(resource) - self.ignoreschedules or resource.scheduled? + self.ignoreschedules or resource_harness.scheduled?(resource) end # Should this resource be skipped? def skip?(resource) - skip = false if missing_tags?(resource) resource.debug "Not tagged with %s" % tags.join(", ") elsif ! scheduled?(resource) @@ -356,11 +355,10 @@ class Puppet::Transaction # Is this resource tagged appropriately? def missing_tags?(resource) - not appropriately_tagged?(resource) - end + return false if ignore_tags? + return false if tags.empty? - def appropriately_tagged?(resource) - self.ignore_tags? or tags.empty? or resource.tagged?(*tags) + not resource.tagged?(*tags) end end |
