Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jupyterhub-unicorespawner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jupyterjsc
packages
jupyterhub-unicorespawner
Commits
79e8f586
Commit
79e8f586
authored
Oct 25, 2023
by
Tim Kreuzer
Browse files
Options
Downloads
Patches
Plain Diff
use same stop logic as in forwardbasespawner apiendpoints
parent
4b5e872d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
unicorespawner/api_notifications.py
+13
-3
13 additions, 3 deletions
unicorespawner/api_notifications.py
with
13 additions
and
3 deletions
unicorespawner/api_notifications.py
+
13
−
3
View file @
79e8f586
import
asyncio
import
datetime
import
inspect
import
json
import
jwt
...
...
@@ -63,8 +63,18 @@ class SpawnEventsUnicoreAPIHandler(APIHandler):
},
)
if
bool
(
spawner
.
_spawn_pending
or
spawner
.
ready
):
event
=
await
spawner
.
unicore_stop_event
()
asyncio
.
create_task
(
spawner
.
stop
(
cancel
=
True
,
event
=
event
))
try
:
if
not
getattr
(
spawner
,
"
resource_url
"
,
None
):
spawner
.
resource_url
=
body
.
get
(
"
href
"
,
""
)
event
=
await
spawner
.
unicore_stop_event
(
spawner
)
except
:
self
.
log
.
exception
(
f
"
{
spawner
.
_log_name
}
- Could not create stop event
"
)
event
=
None
stop
=
spawner
.
stop
(
cancel
=
True
,
event
=
event
)
if
inspect
.
isawaitable
(
stop
):
await
stop
else
:
bssStatus
=
body
.
get
(
"
bssStatus
"
,
""
)
# It's in Running (UNICORE wise) state. We can now check for bssStatus to get more details
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment