Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Joe Chen
mcp_demo
Commits
22845878
Commit
22845878
authored
1 month ago
by
Joe Chen
Browse files
Options
Download
Email Patches
Plain Diff
ss
parent
3f394d76
main
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mcp_server/server.py
+7
-1
mcp_server/server.py
with
7 additions
and
1 deletion
+7
-1
mcp_server/server.py
View file @
22845878
...
...
@@ -16,6 +16,7 @@ import subprocess
import
pymysql
import
pymysql.cursors
import
requests
import
time
# Add these for debugging
import
sys
import
logging
...
...
@@ -386,7 +387,7 @@ async def deploy_repository_site(ctx: Context, repository_url: str, domain_name:
# Clone the repository
result
=
subprocess
.
run
(
[
f
"cd
{
code_path
}
&& git clone
{
clone_url
}
"
],
[
f
"cd
{
code_path
}
&& git clone
{
clone_url
}
.
"
],
capture_output
=
True
,
shell
=
True
,
text
=
True
...
...
@@ -403,6 +404,8 @@ async def deploy_repository_site(ctx: Context, repository_url: str, domain_name:
# Clean up failed deployment
shutil
.
rmtree
(
code_path
,
ignore_errors
=
True
)
return
error_msg
# Install dependencies and build
logger
.
debug
(
"Installing dependencies and building project"
)
...
...
@@ -428,6 +431,9 @@ async def deploy_repository_site(ctx: Context, repository_url: str, domain_name:
# Clean up failed deployment
shutil
.
rmtree
(
code_path
,
ignore_errors
=
True
)
return
error_msg
time
.
sleep
(
10
)
# Check if build directory exists
build_dir
=
os
.
path
.
join
(
code_path
,
"build"
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help