GitLab will be upgraded on June 23rd evening. During the upgrade the service will be unavailable, sorry for the inconvenience.

Commit 00f0bb9e authored by Operator for ID30's avatar Operator for ID30

Now sets the objectId as definded by PYPUSHFLOW_OBJECTID

parent 56bd3431
......@@ -24,6 +24,7 @@ __license__ = "MIT"
__date__ = "16/10/2019"
import os
import bson
import datetime
import pymongo
......@@ -45,8 +46,11 @@ def initMongo(name):
initiator = os.environ.get('PYPUSHFLOW_INITIATOR', 'Unknown')
host = os.environ.get('PYPUSHFLOW_HOST', 'Unknown')
port = os.environ.get('PYPUSHFLOW_PORT', 'Unknown')
objectId = os.environ.get('PYPUSHFLOW_OBJECTID', str(bson.objectid.ObjectId()))
collection = pymongo.MongoClient(mongoUrl).pybes.pybes
workflowData = {
'_id': bson.objectid.ObjectId(objectId),
'Request ID': objectId,
'startTime': getDateTimeString(),
'initiator': initiator,
'host': host,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment