Skip to content

Commit

Permalink
Merge pull request #16519 from [BEAM-13639] [Playground] Add notifica…
Browse files Browse the repository at this point in the history
…tion to Log/Output tabs about cached example

* [BEAM-13639] Added log about cached results for precompiled examples

* [BEAM-13639] Fixed _getPipelineResult method of code_repository
  • Loading branch information
miamihotline committed Jan 19, 2022
1 parent 2148a8e commit 33ae030
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const kTitle = 'Catalog';
const kExecutionCancelledText = '\nPipeline cancelled';
const kPipelineOptionsParseError =
'Failed to parse pipeline options, please check the format (example: --key1 value1 --key2 value2), only alphanumeric and ",*,/,-,:,;,\',. symbols are allowed';
const kCachedResultsLog =
'The results of this example are taken from the Apache Beam Playground cache.\n';

class PlaygroundState with ChangeNotifier {
late SDK _sdk;
Expand Down Expand Up @@ -180,10 +182,11 @@ class PlaygroundState with ChangeNotifier {
notifyListeners();
// add a little delay to improve user experience
await Future.delayed(kPrecompiledDelay);
String logs = _selectedExample!.logs ?? '';
_result = RunCodeResult(
status: RunCodeStatus.finished,
output: _selectedExample!.outputs,
log: _selectedExample!.logs,
log: kCachedResultsLog + logs,
);
_executionTime?.close();
notifyListeners();
Expand Down

0 comments on commit 33ae030

Please sign in to comment.