Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
shared-libs
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pi-Lab
shared-libs
Commits
3f0eef29
Commit
3f0eef29
authored
2 years ago
by
istmxrein
Browse files
Options
Downloads
Patches
Plain Diff
fix bug error comparing timestamps & bump to 1.5.7
parent
e60b1e8d
Branches
assignment_2
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pilab/events/reservation.py
+3
-2
3 additions, 2 deletions
pilab/events/reservation.py
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
4 additions
and
3 deletions
pilab/events/reservation.py
+
3
−
2
View file @
3f0eef29
...
...
@@ -5,6 +5,7 @@ import threading
import
traceback
from
collections
import
Counter
from
datetime
import
datetime
from
zoneinfo
import
ZoneInfo
from
typing
import
List
,
Callable
,
Optional
,
Dict
import
pika
...
...
@@ -283,7 +284,7 @@ def get_active_users(cube_id: int):
if
not
res_thread
:
raise
RuntimeError
(
"
Reservation consumer is not initialized
"
)
if
res
and
res
.
endtime
>
datetime
.
utcnow
():
if
res
and
res
.
endtime
>
datetime
.
utcnow
()
.
replace
(
tzinfo
=
ZoneInfo
(
'
UTC
'
))
:
return
[
*
res
.
extraUsers
,
res
.
owner
]
else
:
return
[]
...
...
@@ -294,7 +295,7 @@ def get_active_reservation(cube_id: int):
if
not
res_thread
:
raise
RuntimeError
(
"
Reservation consumer is not initialized
"
)
if
res
and
res
.
endtime
>
datetime
.
utcnow
():
if
res
and
res
.
endtime
>
datetime
.
utcnow
()
.
replace
(
tzinfo
=
ZoneInfo
(
'
UTC
'
))
:
return
res
else
:
return
None
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
3f0eef29
...
...
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup
(
name
=
'
pilab
'
,
version
=
'
1.5.
6
'
,
version
=
'
1.5.
7
'
,
description
=
'
Shared-Libs for the pi-lab microservices
'
,
url
=
'
https://code.fbi.h-da.de/api/v4/projects/27896/packages/pypi/pilab
'
,
author
=
'
Max Reinheimer
'
,
...
...
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
register
or
sign in
to comment