Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed JobId columns #364

Merged
merged 5 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/Data/Models/ChannelOperationRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,6 @@ public decimal Amount
[NotMapped]
public int NumberOfSignaturesCollected => ChannelOperationRequestPsbts == null ? 0 : ChannelOperationRequestPsbts.Count(x => !x.IsFinalisedPSBT && !x.IsTemplatePSBT && !x.IsInternalWalletPSBT);

/// <summary>
/// This is the JobId provided by Quartz of the job executing this request.
/// </summary>
public string? JobId { get; set; }

AleksKSoftware marked this conversation as resolved.
Show resolved Hide resolved
/// <summary>
/// This indicates if the user requested a changeless operation by selecting UTXOs
/// </summary>
Expand Down
5 changes: 0 additions & 5 deletions src/Data/Models/Node.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ public class Node : Entity
public ICollection<ChannelOperationRequest> ChannelOperationRequestsAsDestination { get; set; }

public ICollection<ApplicationUser> Users { get; set; }

/// <summary>
/// This is the JobId provided by Quartz of the job running the subscription to get the info of the node.
/// </summary>
public string? JobId { get; set; }

#endregion Relationships
}
Expand Down
5 changes: 0 additions & 5 deletions src/Data/Models/WalletWithdrawalRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,6 @@
: WalletWithdrawalRequestPSBTs.Count(x =>
!x.IsTemplatePSBT && !x.IsFinalisedPSBT && !x.IsInternalWalletPSBT);

/// <summary>
/// This is the JobId provided by Quartz of the job executing this request.
/// </summary>
public string? JobId { get; set; }

/// <summary>
/// This indicates if the user requested a changeless operation by selecting UTXOs
/// </summary>
Expand Down Expand Up @@ -200,7 +195,7 @@
public ApplicationUser UserRequestor { get; set; }
public int WalletId { get; set; }

public Wallet Wallet { get; set; }

Check warning on line 198 in src/Data/Models/WalletWithdrawalRequest.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Nullability of reference types in type of parameter 'value' of 'void WalletWithdrawalRequest.Wallet.set' doesn't match implicitly implemented member 'void IBitcoinRequest.Wallet.set' (possibly because of nullability attributes).

public List<WalletWithdrawalRequestPSBT> WalletWithdrawalRequestPSBTs { get; set; }

Expand Down
3 changes: 0 additions & 3 deletions src/Data/Repositories/ChannelRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,6 @@ public async Task<List<Channel>> GetAll()
var job = RetriableJob.Create<ChannelCloseJob>(map, closeRequest.Id.ToString(), retryList);
await scheduler.ScheduleJob(job.Job, job.Trigger);

// TODO: Check job id
closeRequest.JobId = job.Job.Key.ToString();

var jobUpdateResult = _channelOperationRequestRepository.Update(closeRequest);
if (!jobUpdateResult.Item1)
{
Expand Down
4 changes: 1 addition & 3 deletions src/Jobs/MonitorChannelsJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ public async Task Execute(IJobExecutionContext context)
var job = SimpleJob.Create<ChannelMonitorJob>(map, managedNode.Id.ToString());
await scheduler.ScheduleJob(job.Job, job.Trigger);

var jobId = job.Job.Key.ToString();
managedNode.JobId = jobId;
var jobUpateResult = _nodeRepository.Update(managedNode);
if (!jobUpateResult.Item1)
{
_logger.LogWarning("Couldn't update Node {NodeId} with JobId {JobId}", managedNode.Id, jobId);
_logger.LogWarning("Couldn't update Node {NodeId}", managedNode.Id);
}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/Jobs/NodeSubscriptorJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public async Task Execute(IJobExecutionContext context)
var job = SimpleJob.Create<NodeChannelSuscribeJob>(map, managedNode.Id.ToString());
await scheduler.ScheduleJob(job.Job, job.Trigger);

managedNode.JobId = job.Job.Key.ToString();
var jobUpateResult = _nodeRepository.Update(managedNode);
}
}
Expand Down
Loading
Loading