diff options
author | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2019-07-02 15:01:50 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-07-05 09:44:45 +0000 |
commit | b60fffebf563edfe258cbb893754197af1ac5a0b (patch) | |
tree | 48d7a2bee30f9b9edf6ea825bc9b22c804d38e53 /tests/sourcecache | |
parent | fe632514cb1892da1fe0c0f0c3a4fa3d33a8ec50 (diff) | |
download | buildstream-b60fffebf563edfe258cbb893754197af1ac5a0b.tar.gz |
Refactor: message handlers take 'is_silenced'
Remove the need to pass the Context object to message handlers, by
passing what is usually requested from the context instead.
This paves the way to sharing less information with some child jobs -
they won't need the whole context object, just the messenger.
Diffstat (limited to 'tests/sourcecache')
-rw-r--r-- | tests/sourcecache/fetch.py | 2 | ||||
-rw-r--r-- | tests/sourcecache/push.py | 2 | ||||
-rw-r--r-- | tests/sourcecache/staging.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/sourcecache/fetch.py b/tests/sourcecache/fetch.py index cd8a3e989..d7145d7f4 100644 --- a/tests/sourcecache/fetch.py +++ b/tests/sourcecache/fetch.py @@ -34,7 +34,7 @@ from tests.testutils import create_artifact_share DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project") -def message_handler(message, context): +def message_handler(message, is_silenced): pass diff --git a/tests/sourcecache/push.py b/tests/sourcecache/push.py index 4c652d21e..af4e262f0 100644 --- a/tests/sourcecache/push.py +++ b/tests/sourcecache/push.py @@ -35,7 +35,7 @@ from tests.testutils import create_artifact_share DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project") -def message_handler(message, context): +def message_handler(message, is_silenced): pass diff --git a/tests/sourcecache/staging.py b/tests/sourcecache/staging.py index 318285292..cffd0bb58 100644 --- a/tests/sourcecache/staging.py +++ b/tests/sourcecache/staging.py @@ -35,7 +35,7 @@ from tests.testutils.element_generators import create_element_size DATA_DIR = os.path.dirname(os.path.realpath(__file__)) -def dummy_message_handler(message, context): +def dummy_message_handler(message, is_silenced): pass |