Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
workflow
pypushflow
Commits
36663d9f
Commit
36663d9f
authored
Mar 10, 2021
by
Olof Svensson
Browse files
Issue
#2
: Removed bson and pymongo from requirements
parent
d72553e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
pypushflow/UtilsMongoDb.py
View file @
36663d9f
...
...
@@ -24,11 +24,17 @@ __license__ = "MIT"
__date__
=
"16/10/2019"
import
os
import
bson
import
datetime
import
pymongo
from
bson.objectid
import
ObjectId
try
:
import
pymongo
import
bson
from
bson.objectid
import
ObjectId
USE_MONGODB
=
True
except
:
print
(
"Error when trying to import pymongo and/or bson - no MongoDB connection possible"
)
USE_MONGODB
=
False
def
getDateTimeString
():
...
...
@@ -36,7 +42,10 @@ def getDateTimeString():
def
getMongoUrl
():
return
os
.
environ
.
get
(
'PYPUSHFLOW_MONGOURL'
,
None
)
mongoUrl
=
None
if
USE_MONGODB
:
mongoUrl
=
os
.
environ
.
get
(
'PYPUSHFLOW_MONGOURL'
,
None
)
return
mongoUrl
def
initMongo
(
name
):
...
...
requirements.txt
View file @
36663d9f
pymongo
bson
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment