Skip to content

Commit 56344b9

Browse files
committed
Implement review suggestions
1 parent ea1fb9b commit 56344b9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Npgmq/INpgmqClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ public interface INpgmqClient
341341
/// </remarks>
342342
/// <param name="queueName">The queue name.</param>
343343
/// <param name="msgId">The message ID.</param>
344-
/// <param name="vt">The new vt.</param>
344+
/// <param name="vt">The new timestamp at which the message becomes visible.</param>
345345
/// <param name="cancellationToken">The cancellation token.</param>
346346
Task SetVtAsync(string queueName, long msgId, DateTimeOffset vt, CancellationToken cancellationToken = default);
347347

@@ -367,7 +367,7 @@ Task<List<long>> SetVtBatchAsync(string queueName, IEnumerable<long> msgIds, int
367367
/// </remarks>
368368
/// <param name="queueName">The queue name.</param>
369369
/// <param name="msgIds">The message IDs.</param>
370-
/// <param name="vt">The new vt.</param>
370+
/// <param name="vt">The new timestamp at which the messages become visible.</param>
371371
/// <param name="cancellationToken">The cancellation token.</param>
372372
/// <returns>List of IDs that were updated.</returns>
373373
Task<List<long>> SetVtBatchAsync(string queueName, IEnumerable<long> msgIds, DateTimeOffset vt,

Npgmq/NpgmqClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ public async Task SetVtAsync(string queueName, long msgId, DateTimeOffset vt, Ca
863863
{
864864
cmd.Parameters.AddWithValue("@queue_name", queueName);
865865
cmd.Parameters.AddWithValue("@msg_id", msgId);
866-
cmd.Parameters.AddWithValue("@vt", vt);
866+
cmd.Parameters.AddWithValue("@vt", vt.ToUniversalTime());
867867
await cmd.ExecuteNonQueryAsync(cancellationToken).ConfigureAwait(false);
868868
}
869869
}
@@ -918,7 +918,7 @@ public async Task<List<long>> SetVtBatchAsync(string queueName, IEnumerable<long
918918
{
919919
cmd.Parameters.AddWithValue("@queue_name", queueName);
920920
cmd.Parameters.AddWithValue("@msg_ids", NpgsqlDbType.Array | NpgsqlDbType.Bigint, msgIds.ToArray());
921-
cmd.Parameters.AddWithValue("@vt", vt);
921+
cmd.Parameters.AddWithValue("@vt", vt.ToUniversalTime());
922922
var reader = await cmd.ExecuteReaderAsync(cancellationToken).ConfigureAwait(false);
923923
await using (reader.ConfigureAwait(false))
924924
{

0 commit comments

Comments
 (0)