factory.py 文件源码

python
阅读 39 收藏 0 点赞 0 评论 0

项目:of 作者: OptimalBPM 项目源码 文件源码
def store_process_system_document(_process_id, _name, _parent_id=None):
    """
    Creates a process instance structure, automatically sets systemPid, spawnedBy, host and spawnedWhen
    """
    _struct = {
        "_id": _process_id,
        "systemPid": os.getpid(),
        "spawnedBy": get_current_login(),
        "name": _name,
        "host": socket.getfqdn(),
        "spawnedWhen": str(datetime.datetime.utcnow()),
        "schemaRef": "ref://of.process.system"
    }
    if _parent_id:
        _struct["parent_id"] = _parent_id,

    return _struct
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号