Conversation
…ts into the registry
Contributor
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
| [Fact] | ||
| public async Task Collector_RecordsHeartbeat_AndPublishesDiscoveredEvent() | ||
| { | ||
| var container = new Container(); |
| [Fact] | ||
| public async Task EnqueueAsync_PublishesJobRequestToConfiguredQueue() | ||
| { | ||
| var container = new Container(); |
|
|
||
| private static JobScheduler NewScheduler() | ||
| { | ||
| var container = new Container(); |
| public async Task AddTemplating_ResolvesRendererAndRenders() | ||
| { | ||
| using var temp = new TempDirectory(); | ||
| var container = new Container(); |
| { | ||
| private static (IMessageTopic topic, WorkerState state) NewMessaging(WorkersConfig config) | ||
| { | ||
| var container = new Container(); |
| private readonly IWorkerState _state; | ||
| private readonly TimeSpan _interval; | ||
| private readonly string _topicName; | ||
| private CancellationTokenSource? _loopCts; |
Comment on lines
+112
to
+115
| catch (Exception ex) | ||
| { | ||
| _logger.Error(ex, "Failed to publish heartbeat; will retry on the next tick."); | ||
| } |
| public async Task StartAsync_AutoLoadsTemplatesFromDirectory() | ||
| { | ||
| using var temp = new TempDirectory(); | ||
| var emails = Path.Combine(temp.Path, "templates", "emails"); |
| using var temp = new TempDirectory(); | ||
| var emails = Path.Combine(temp.Path, "templates", "emails"); | ||
| Directory.CreateDirectory(emails); | ||
| await File.WriteAllTextAsync(Path.Combine(emails, "welcome.tmpl"), "Welcome {{ user.name }}"); |
|
|
||
| public Task HandleAsync(SquidStd.Workers.Abstractions.Data.JobRequest job, CancellationToken cancellationToken) | ||
| { | ||
| Interlocked.Increment(ref Calls); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Release of three feature areas merged into
developsince the last release.SquidStd.Templating
Scriban-backed templating:
ITemplateRendererfor ad-hoc and named (compiled/cached) templates, startup auto-load oftemplates/**/*.tmpl,AddTemplating()registration, README + DocFX article.Messaging pub/sub + EventBus bridge
Transient fan-out topics alongside the existing competing-consumers queue:
ITopicProvider/IMessageTopic, in-memory and RabbitMQ (fanout exchange) providers, and a one-way Topic→EventBus bridge (TopicMessageEvent). Bundled intoAddInMemoryMessaging()/AddRabbitMqMessaging().Workers system (4 packages)
JobRequest,WorkerHeartbeat,WorkerInfo,WorkerStatusType,WorkerChannels.IJobHandlers up toMaxConcurrency, publishes heartbeats on a topic.AddWorkers()/AddJobHandler<T>().WorkerInforegistry, marks workersOfflinevia a timer-wheel sweep, publishesWorkerStatusChangedEvent, and exposes opt-in ASP.NET endpoints (GET /workers,GET /workers/{id},POST /jobs).AddWorkerManager()/MapWorkerManagerEndpoints().Test Plan
IWorkerRegistry.Get)