Skip to content

Commit

Permalink
Add organization id to packet (QuantConnect#5733)
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-Molinero authored Jul 2, 2021
1 parent 8d2455b commit 12b62f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Common/Packets/AlgorithmNodePacket.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
Expand Down Expand Up @@ -49,6 +49,10 @@ public AlgorithmNodePacket(PacketType type)
[JsonProperty(PropertyName = "sUserToken")]
public string UserToken = "";

/// User Organization Id
[JsonProperty(PropertyName = "sOrganizationID")]
public string OrganizationId = "";

/// <summary>
/// Project Id of the request
/// </summary>
Expand Down
3 changes: 3 additions & 0 deletions Queues/JobQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class JobQueue : IJobQueueHandler
private const string DefaultDataChannelProvider = "DataChannelProvider";
private bool _liveMode = Config.GetBool("live-mode");
private static readonly string AccessToken = Config.Get("api-access-token");
private static readonly string OrganizationId = Config.Get("job-organization-id");
private static readonly int UserId = Config.GetInt("job-user-id", 0);
private static readonly int ProjectId = Config.GetInt("job-project-id", 0);
private readonly string AlgorithmTypeName = Config.Get("algorithm-type-name");
Expand Down Expand Up @@ -109,6 +110,7 @@ public AlgorithmNodePacket NextJob(out string location)
UserToken = AccessToken,
UserId = UserId,
ProjectId = ProjectId,
OrganizationId = OrganizationId,
Version = Globals.Version,
DeployId = algorithmId,
Parameters = parameters,
Expand Down Expand Up @@ -140,6 +142,7 @@ public AlgorithmNodePacket NextJob(out string location)
UserToken = AccessToken,
UserId = UserId,
ProjectId = ProjectId,
OrganizationId = OrganizationId,
Version = Globals.Version,
BacktestId = algorithmId,
Language = Language,
Expand Down

0 comments on commit 12b62f6

Please sign in to comment.