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

Fix thread values #819

Merged
merged 3 commits into from
Jul 3, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dbt/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ def compile_target(self, target_cfg):

compiled[key] = compiled_val

if self.args and hasattr(self.args, 'threads') and self.args.threads:
compiled['threads'] = self.args.threads

return compiled

def compile_and_update_target(self):
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
with x as (select pg_sleep(1)) select 1
33 changes: 33 additions & 0 deletions test/integration/031_thread_count_test/test_thread_count.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from nose.plugins.attrib import attr
from test.integration.base import DBTIntegrationTest, FakeArgs

from dbt.task.test import TestTask
from dbt.project import read_project
import os


class TestDataTests(DBTIntegrationTest):

@property
def project_config(self):
return {}

@property
def profile_config(self):
return {
'threads': 2,
}

@property
def schema(self):
return "thread_tests_031"

@property
def models(self):
return "test/integration/031_thread_count_test/models"

@attr(type='postgres')
def test_postgres_threading_8x(self):
self.use_profile('postgres')

self.run_dbt(args=['run', '--threads', '16'])