Skip to content

Commit

Permalink
Merge pull request #22 from devsapp/fix/invoke
Browse files Browse the repository at this point in the history
fix:invoke return
  • Loading branch information
rsonghuster authored Nov 6, 2024
2 parents 1c359c6 + d1487ba commit e7faae7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/registry-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
s registry login --token ${{ secrets.alibaba_registry_v3_publish_token }}
- name: release prod
run: |
s registry publish
s registry publish
6 changes: 4 additions & 2 deletions src/code/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,11 @@ def invoke():
# subprocess.check_call(["ls", "-ll", "/tmp"])
print("FC Invoke End RequestId: " + request_id)
if result.status == 200:
return "upload to oss success!"
print("upload to oss success!")
return {"code": "Success"}
else:
return "upload fail, error code %s " % result.status
print("upload fail, error code %s " % result.status)
return {"code": "Failed"}

except Exception as e:
exc_info = sys.exc_info()
Expand Down

0 comments on commit e7faae7

Please sign in to comment.