question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add stealable keyword

See original GitHub issue

Inspired by this stackoverflow question, I want to suggest adding a idempotent keyword somewhere in the workflow, which in the case idempotent = False switches off work stealing. I would suggest to make it a keyword of a delayed object, in this case a workflow that expects tasks to be run only once could look like this:

c = distributed.Client()
delayed(mytask, idempotent = False).compute(get = c.get)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:30 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
mrocklincommented, Feb 1, 2017

Okay, I understand that. Generally it would be nice to have a good way to react if a task runs twice. Are there alternatives that are both convenient for the user and easy to implement?

I can’t think of anything at the moment. My inclination would be to try to resolve this by making tasks idempotent (can be run multiple times without bad effect) and not depending on side effects like local files. Or, if you require local files, tie their cleanup to cleanup within the python process using __del__ or the atexit module.

Generally speaking Dask doesn’t play nicely with code that depends on side effects. My recommendations are usually going to be about avoiding or mitigating the use of side effects.

0reactions
abastcommented, Nov 1, 2017

This is awesome, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to steal the competition's best keywords: A 3-step guide
Pick the right keywords and your business will thrive. Pick the wrong keywords, and you might as well be flushing your ad spend...
Read more >
How Keyword Thieves Steal Your Google Rankings
Learn all about keyword thieves and how they can steal and utilize your content for their own gain, what you can do to...
Read more >
How to Check & "Steal" Your Competitors' Top Keywords
How to Check and “Steal” Your Competitors' Top Keywords · 2. Perform a Google Search · First Things First, Check Your Site ·...
Read more >
How to Find Competitors Keywords and Steal Their Traffic
Showing you semantically-related keywords to add · Telling you the target readability and length by analyzing the top 10 ranking rivals on Google...
Read more >
What to Do When Competitors Buy Your Brand Keyword
The use of your brand keywords and brand name has no doubt proven to be the most ... can't use your trademarked brand...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found