Skip to content

Commit eb000d7

Browse files
committed
remove useless functions in vefaas
1 parent 38db203 commit eb000d7

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

veadk/cli/services/vefaas/vefaas.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import importlib.util
1615
import json
1716
import time
1817

@@ -59,36 +58,6 @@ def __init__(self, access_key: str, secret_key: str, region: str = "cn-beijing")
5958

6059
self.template_id = "6874f3360bdbc40008ecf8c7"
6160

62-
def _pre_check(self, path: str):
63-
if not path.exists():
64-
raise ValueError(f"Path {path} does not exist.")
65-
66-
index_py_path = path / "index.py"
67-
if not index_py_path.exists():
68-
raise ValueError(
69-
"The project directory must include the `index.py` file. See: https://www.volcengine.com/docs/6662/107432"
70-
)
71-
typer.echo(
72-
typer.style(
73-
"Check `index.py` file pass.",
74-
fg=typer.colors.BRIGHT_BLACK,
75-
),
76-
)
77-
78-
spec = importlib.util.spec_from_file_location("index", index_py_path)
79-
module = importlib.util.module_from_spec(spec)
80-
spec.loader.exec_module(module)
81-
if not (hasattr(module, "handler") and callable(module.handler)):
82-
raise ValueError(
83-
"The `index.py` file must include a `handler` function. See: https://www.volcengine.com/docs/6662/107432"
84-
)
85-
typer.echo(
86-
typer.style(
87-
"Check `handler` function pass.",
88-
fg=typer.colors.BRIGHT_BLACK,
89-
),
90-
)
91-
9261
def _create_function(self, name: str, path: str):
9362
function_name = f"{name}-fn-{formatted_timestamp()}"
9463

@@ -168,9 +137,6 @@ def _create_function(self, name: str, path: str):
168137

169138
return function_name, function_id
170139

171-
def _get_template(self):
172-
pass
173-
174140
def _create_application(
175141
self,
176142
application_name: str,

0 commit comments

Comments
 (0)