-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix python args Fix a typo for python tasks Fix a typo for python printing Fix a typo for python printing
- Loading branch information
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
_export: | ||
py: | ||
require: tasks.initialize.InstanceVariable | ||
arg1: var1 | ||
arg2: var2 | ||
|
||
+step1: | ||
py>: tasks.initialize.InstanceVariable.step1 | ||
|
||
+step2: | ||
py>: tasks.initialize.InstanceVariable.step2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
_export: | ||
rb: | ||
require: 'tasks/initialize' | ||
arg1: var1 | ||
arg2: var2 | ||
|
||
+step1: | ||
rb>: InstanceVariable.step1 | ||
|
||
+step2: | ||
rb>: InstanceVariable.step2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import digdag | ||
|
||
class InstanceVariable: | ||
def __init__(self, arg1): | ||
self.arg1 = arg1 | ||
|
||
def step1(self): | ||
print(self.arg1) | ||
print(digdag.env.params['arg1']) | ||
print(digdag.env.params['arg2']) | ||
print('self.arg1 is modified!!!') | ||
self.arg1 = 'var3' | ||
print(self.arg1) | ||
|
||
def step2(self): | ||
print('Instance variables is initialized by each tasks.') | ||
print(self.arg1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class InstanceVariable | ||
def initialize(arg1) | ||
@var = arg1 | ||
end | ||
|
||
def step1 | ||
puts @var | ||
puts Digdag.env.params['arg1'] | ||
puts Digdag.env.params['arg2'] | ||
puts '@var is modified!!!' | ||
@var = 'var3' | ||
puts @var | ||
end | ||
|
||
def step2 | ||
puts "Instance variables is initialized by each tasks." | ||
puts @var | ||
end | ||
end |