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

Откорректирован запрос выборки последней позиции для ClickHouse #50

Merged
merged 1 commit into from
Jan 31, 2023
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

.vscode/

# Project-specific files
log.txt

Expand Down Expand Up @@ -340,4 +342,4 @@ ASALocalRun/
.localhistory/

# BeatPulse healthcheck temp database
healthchecksdb
healthchecksdb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public async Task<EventLogPosition> ReadEventLogPositionAsync(CancellationToken
await CreateConnectionAsync(cancellationToken);

var commandText =
$"SELECT TOP 1 FileName, EndPosition, LgfEndPosition, Id FROM {TableName} ORDER BY Id DESC";
$"SELECT TOP 1 FileName, EndPosition, LgfEndPosition, Id FROM {TableName} ORDER BY DateTime DESC, EndPosition DESC";

await using var cmd = _connection.CreateCommand();
cmd.CommandText = commandText;
Expand Down
2 changes: 1 addition & 1 deletion OneSTools.EventLog/EventLogReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ private void StartLgpFilesWatcher()

_lgpFilesWatcher = new FileSystemWatcher(_settings.LogFolder, "*.lgp")
{
NotifyFilter = NotifyFilters.CreationTime | NotifyFilters.LastWrite
NotifyFilter = NotifyFilters.CreationTime | NotifyFilters.LastWrite | NotifyFilters.Size
};
_lgpFilesWatcher.Changed += LgpFilesWatcher_Event;
_lgpFilesWatcher.Created += LgpFilesWatcher_Event;
Expand Down