Skip to content

Commit

Permalink
check for travis
Browse files Browse the repository at this point in the history
  • Loading branch information
jpn-- committed Jun 13, 2022
1 parent 184dfc4 commit 1730085
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions activitysim/core/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@

_FLOWS = {}

if os.environ.get('TRAVIS') == 'true':
# The multithreaded dask scheduler causes problems on travis.
# Here, we detect if this code is running on Travis, and if so, we
# change the default scheduler to single-threaded. This should not
# be particularly problematic, as only tiny test cases are run on Travis.
import dask
dask.config.set(scheduler='single-threaded') # overwrite default with threaded scheduler


@contextlib.contextmanager
def logtime(tag, tag2=""):
Expand Down

0 comments on commit 1730085

Please sign in to comment.