Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

useless parsing of tasks #40

Open
Rocco83 opened this issue Aug 9, 2017 · 0 comments
Open

useless parsing of tasks #40

Rocco83 opened this issue Aug 9, 2017 · 0 comments

Comments

@Rocco83
Copy link
Contributor

Rocco83 commented Aug 9, 2017

Hi,

given the code, if the latest job is found with "no new packages" is found, then if checkrepos is "on" all of the tasks are parsed up to find out a task that match the channel that we need for.
We are here at the code

if @options[:checkrepos]

When one repository is found, further check are done

if tasker['input']['repository']['id'] == repo['id']

A deeper check start

def checktask(task, last_date)

When the task is from the past, the code is just skipping this task

puts_verbose "#{task['humanized']['output']} This past task will NOT trigger a Publish."

Wondering if in this section of code, if the task is from the paste, we can skip the remaining tasks.

if ( checktask(tasker, cv_last_published) )

Looking at the code , my understanding is that if a "past task" is found, since the tasks are sorted by ended_at, we can be sure that no other tasks will be found afterwards with packages that are missing.

Any comment?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant