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

async_map: fix bug #3153

Merged
merged 1 commit into from
May 8, 2019
Merged

async_map: fix bug #3153

merged 1 commit into from
May 8, 2019

Conversation

oliver-sanders
Copy link
Member

Fix a really embarrassing bug in the async_map function (which is used for the --ordered option to cylc scan) 😢 .

@oliver-sanders oliver-sanders added the bug Something is wrong :( label May 7, 2019
@oliver-sanders oliver-sanders added this to the cylc-8.0a1 milestone May 7, 2019
@oliver-sanders oliver-sanders requested review from kinow and wxtim May 7, 2019 15:59
@kinow
Copy link
Member

kinow commented May 7, 2019

Leaving for @wxtim the merge and final review 👍

Copy link
Contributor

@matthewrmshin matthewrmshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not part of this change, but doc string at line 43 has duplicated iterator.

@oliver-sanders
Copy link
Member Author

Think I cut off the last two lines when I copied the code...

Copy link
Member

@wxtim wxtim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible to me.

@wxtim wxtim merged commit 9a3c17e into cylc:master May 8, 2019
@dwsutherland
Copy link
Member

Hmmm.. How does changed ever be anything but True?

        changed = True
        while changed and completed_tasks:
            if index in completed_tasks:
                yield completed_tasks.pop(index)
                changed = True
                index += 1
            else:
                break

@oliver-sanders
Copy link
Member Author

Hmmm.. How does changed ever be anything but True?

Dammit.

@oliver-sanders oliver-sanders deleted the async-map-fix branch May 8, 2019 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :(
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants