Merged
Conversation
…k merge between branches
* Fixed the scheduler background to Task.Delay since the Peridic Timer were skipping ticks on short interval with seconds. * small refactor * fixed the mixd up delete ticker
* Made improvements and new feature: request by default not using GZIP compression * Added timezone dashboard support and other fix on features. * Fixed the seefing data
* Added some new features on dashboard and on demand running directly without giving pressure of background scheduler * Added dispatch interfaces * added pagination on machine names * Added test coverage * added examples * Added sample sqlite for samples * Added csproj fules for Sample data * fixed the locking of immediate run ticker in safe for runcondition * fiexed indexing, the scheduler on high run and memory persistence * fixed dashboard path merge * small fixes on manager * Added migration changes for examples
* Fix schema assignment logic in UseTickerQDbContext and add SetSchema method * Refactor UseTickerQDbContext to simplify schema assignment logic
* Checkpoint from VS Code for coding agent session * Remove documentation on separating job queueing from job processing
* Add retry logic improvements and unit tests for ExecuteTaskAsync * Refactor retry test setup to use SetupRetryTestFixture for consistency
…crementalSourceGenerator (#433)
* Initial plan * Add configurable authorization policy name for Host mode Co-authored-by: jods4 <3832820+jods4@users.noreply.github.com> * Refactor: Make policy an optional parameter to WithHostAuthentication Co-authored-by: jods4 <3832820+jods4@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jods4 <3832820+jods4@users.noreply.github.com>
Convert Windows timezone IDs (e.g. "Eastern Standard Time") to IANA format (e.g. "America/New_York") before sending to the frontend, so Intl.DateTimeFormat can correctly render dates in the configured scheduler timezone. Also add defensive fallback in the frontend formatDate() for invalid timezone IDs, and Windows timezone ID pattern matching in getDateFormatRegion() for correct US/EU date format selection. Co-authored-by: Alberti's MacMini <albert@Albertis-Mac-mini.local> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Skip TickerQ initialization when running inside design-time tools (#712) Build-time tools like dotnet-getdocument (used by Microsoft.Extensions.ApiDescription.Server for OpenAPI generation) invoke Program.Main to build the host, which triggers UseTickerQ → InitializeTickerQ → SeedDefinedCronTickers. This causes database queries in a context where no valid connection string exists, crashing the build. Add an Assembly.GetEntryAssembly() guard that detects dotnet-* tool entry assemblies and short-circuits InitializeTickerQ before any DB-touching or background service initialization occurs. Closes #712 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Defer TickerQ initialization to host lifecycle instead of inline UseTickerQ (#712) Replace the Assembly.GetEntryAssembly() heuristic with a proper lifecycle-based approach: move all I/O-bound initialization (function discovery, DB seeding, external provider startup) from inline UseTickerQ into a dedicated TickerQInitializerHostedService that runs during host.StartAsync(). Design-time tools (dotnet-getdocument, dotnet-ef, etc.) build the host but never start it, so the hosted service naturally never runs — no heuristics needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Alberti's MacMini <albert@Albertis-Mac-mini.local> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…idation (#764) - Add lock to Build() so concurrent hosts (e.g. WebApplicationFactory tests) don't overwrite a populated FrozenDictionary with an empty one (fixes #705) - Initialize static FrozenDictionary fields to .Empty instead of null to prevent NullReferenceException when UseTickerQ() is not called - Add IsBuilt flag to distinguish "UseTickerQ() not called" from "no [TickerFunction] methods found" - Add TickerQStartupValidator IHostedService that warns at startup when UseTickerQ() is missing or no ticker functions are registered - Update test ResetProvider() to use FrozenDictionary.Empty and reset IsBuilt Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The sample project uses PackageReference with $(Version) which resolves to the version being built. Restoring the full solution fails because the package isn't published yet. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixes sync build failures on net8/net9 branches where $(Version) resolved to a version that doesn't exist on NuGet yet. All samples now consistently use ProjectReference. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…) (#773) When WithHostAuthentication() is configured, dashboard endpoints use RequireAuthorization() metadata. ASP.NET Core's EndpointMiddleware throws InvalidOperationException if no AuthorizationMiddleware exists between UseRouting() and UseEndpoints(). The host app's UseAuthorization() does not propagate into Map() branches, so the dashboard branch needs its own. Closes #408 Co-authored-by: Alberti's MacMini <albert@Albertis-Mac-mini.local> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix PostgreSQL incompatible boolean default in CronTicker (#778) Replace HasDefaultValueSql("1") with HasDefaultValue(true) so EF Core translates the CLR boolean into the correct SQL literal for each provider (1 for SQL Server/SQLite, TRUE for PostgreSQL, appropriate value for Oracle). The raw SQL literal "1" is invalid for PostgreSQL boolean columns, causing migration failure with error 42804. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Use CLR-side default for CronTicker.IsEnabled instead of DB default Remove HasDefaultValue(true) and HasSentinel(true) from the EF configuration; the C# property initializer (= true) is sufficient. EF Core always includes the property in INSERT/UPDATE SQL, so no provider-specific SQL default translation is needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…t and updating UI/logic for a click-to-authenticate flow. (#786)
* Fix startup cron occurrence duplicate scheduling (#776) At startup, past-due cron occurrences left over from a previous application lifecycle were being caught up by the fallback service, causing unexpected duplicate executions. This was most visible when stopping and restarting the application — the cron job would fire immediately for the missed slot AND schedule normally for the next slot. The fix adds a startup cleanup step that marks stale past-due occurrences (ExecutionTime more than 5 seconds old, still in Idle/Queued status) as Skipped before the scheduler and fallback services begin. This prevents the fallback from catching up occurrences from a previous lifecycle while preserving normal fallback behavior for the current lifecycle. The 5-second grace period ensures that very recent occurrences (e.g. from a sub-second restart) are not incorrectly skipped. Closes #776 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Refactor stale cron occurrence cleanup into opt-in configurable option Make stale-cron-occurrence skipping disabled by default (threshold = Zero) and expose SkipStaleCronOccurrencesOnStartup() on TickerOptionsBuilder as the primary opt-in API. The threshold is now passed through the full call chain instead of being hardcoded in persistence providers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… scripts, AOT support (#793) - Extract BaseRedisPersistenceProvider with core scheduler logic (mirrors EF Core pattern) - Extract Helpers: RedisKeyBuilder, RedisIndexManager, RedisSerializer - Move Lua scripts to embedded .lua files (Acquire, Release, RecoverDeadNode) - AOT: use KEYS[]/ARGV[] notation, source-gen JsonSerializerContext, JsonTypeInfo overloads - AOT: add RedisContextJsonSerializerContext with all entity types registered - AOT: replace TimeTickerEntityConverter with source-gen serialization - Add [JsonInclude] on internal set entity properties for serializer visibility - Add NodeHeartbeatPayload named type (replaces anonymous type) - Add predicate filtering inside deserialization loop (less memory allocation) - Add TickerQRedisOptionBuilder.JsonSerializerContext for user-provided AOT contexts - Add comprehensive unit tests (32 persistence + 14 manager integration + 5 on-demand) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ent test hosts (#784) * test: add unit test for Build method stability after updating cron expressions * test: add unit test for cron expression updates after initial build * fix: initialize dictionaries with existing data in TickerFunctionProvider * fix: add locking to function and request type registrations in TickerFunctionProvider Build() is protected by _buildLock, but registration methods (RegisterFunctions, RegisterRequestType, RegisterRequestInfo, and UpdateCronExpressionsFromIConfiguration) mutate the same delegate fields via += without taking that lock. In concurrent host-startup scenarios, this can still lead to lost/late registrations (e.g., a cron-update callback added while another thread is building). Consider synchronizing registration updates with the same lock (or using an Interlocked.CompareExchange loop) so registrations and builds are atomic relative to each other.
* Refactor source generator with templates, add ITickerFunction interface, MapTicker API, and Dashboard AOT support
Source Generator:
- Replace StringBuilder code generation with const string templates (Generation/Templates.cs)
- Extract MethodAnalyzer, ConstructorAnalyzer, InterfaceMethodAnalyzer into Analysis/
- Extract FactoryGenerator, FunctionRefsGenerator into Generation/
- Add TickerMethodModel, ConstructorModel, TickerFunctionInterfaceInfo models
- Generate TickerFunctions.g.cs with typed TickerFunctionRef per function
- Scan ITickerFunction/ITickerFunction<T> interface implementations
- Use global:: prefix for all type references (namespace-safe)
- Handle C# keyword aliases (string→System.String, int→System.Int32, byte[]→System.Byte[])
- Use collection initializer syntax in generated code
- Move ToGenericContextWithRequest to TickerQ.Utilities.TickerRequestProvider
TickerQ.Utilities:
- Add ITickerFunction, ITickerFunction<T>, ITickerFunctionBase interfaces
- Add TickerFunctionRef, TickerFunctionRef<T> structs for type-safe function references
- Add TickerFunctionBuilder<T> for fluent MapTicker configuration
- Add TickerFunctionProvider.Configure() for runtime config overrides
TickerQ:
- Add MapTicker<T>() extension for interface-based function registration
- Add MapTimeTicker() for lambda-based function registration
Dashboard AOT:
- Rewrite all endpoint handlers to accept only HttpContext (NativeAOT compatible)
- Replace Results.Json with WriteJson helper using JsonTypeInfo
- Rewrite JsonExampleGenerator to use JsonTypeInfo.Properties (zero reflection)
- Fix StringToByteArrayConverter to use JsonTypeInfo overloads
- Fix TickerDashboardRepository: Enum.GetValues<T>(), JsonTypeInfo for deserialization
- Remove DefaultJsonTypeInfoResolver from DashboardJsonOptions
- Add IsAotCompatible to Dashboard csproj
- Zero AOT warnings from Dashboard code
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Remove interface scanning from source gen, add MapTickerGroup, DI-based registration
- Source generator no longer scans ITickerFunction implementations (only [TickerFunction] attributes)
- MapTicker<T>() now registers via IServiceCollection with DI (no reflection, AOT-safe)
- Add MapTickerGroup() with two styles: inline callback and variable
- Group prefixes function names: "GroupName.ClassName"
- Add TickerFunctionProvider.RegisterTypeMapping for type-safe manager lookups
- Add WithLifetime() default ServiceLifetime.Scoped (one instance per execution scope)
- Support name override: group.MapTicker<T>("CustomName")
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* added to managers.
* Added cron validator with normalizer
* AOT support: WithJsonContext, AOT-safe request serialization, SignalR and exception serialization
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Rename MapTimeTicker to MapTicker for lambda-based overloads
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add ITickerQueryable abstraction, rename MapTimeTicker to MapTicker, make TickerFunctionBuilder non-generic
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
#804) * fix the endpoints and missing persistence methods and pre-relase for 10.2.5 * fixed the issue on tests. * fix example results * added redis tests to solution
# Conflicts: # README.md # TickerQ.slnx # hub/sdks/dotnet/TickerQ.SDK/Persistence/TickerQRemotePersistenceProvider.cs # samples/TickerQ.Sample.Dashboard.ReflectionFree/Program.cs # samples/TickerQ.Sample.Dashboard.ReflectionFree/SampleJobs.cs # samples/TickerQ.Sample.Dashboard.ReflectionFree/TickerQ.Sample.Dashboard.ReflectionFree.csproj # src/Directory.Build.props # src/TickerQ.Caching.StackExchangeRedis/DependencyInjection/ServiceExtension.cs # src/TickerQ.Caching.StackExchangeRedis/Infrastructure/TickerRedisPersistenceProvider.cs # src/TickerQ.Caching.StackExchangeRedis/TickerQ.Caching.StackExchangeRedis.csproj # src/TickerQ.Dashboard/DependencyInjection/ServiceCollectionExtensions.cs # src/TickerQ.Dashboard/Endpoints/DashboardEndpoints.cs # src/TickerQ.Dashboard/Infrastructure/Dashboard/JsonExampleGenerator.cs # src/TickerQ.Dashboard/Infrastructure/DashboardJsonSerializerContext.cs # src/TickerQ.Dashboard/Infrastructure/StringToByteArrayConverter.cs # src/TickerQ.Dashboard/TickerQ.Dashboard.csproj # src/TickerQ.EntityFrameworkCore/Infrastructure/BasePersistenceProvider.cs # src/TickerQ.EntityFrameworkCore/Infrastructure/MappingExtensions.cs # src/TickerQ.SourceGenerator/TickerQIncrementalSourceGenerator.cs # src/TickerQ.Utilities/Managers/InternalTickerManager.cs # src/TickerQ.Utilities/TickerFunctionProvider.cs # src/TickerQ.Utilities/TickerHelper.cs # src/TickerQ.Utilities/TickerOptionsBuilder.cs # src/TickerQ/Src/BackgroundServices/TickerQInitializerHostedService.cs # src/TickerQ/Src/Provider/TickerInMemoryPersistenceProvider.cs # tests/TickerQ.Tests/DashboardEndpointTests.cs # tests/TickerQ.Tests/DesignTimeToolDetectionTests.cs # tests/TickerQ.Tests/JsonExampleGeneratorTests.cs # tests/TickerQ.Tests/TickerFunctionProviderTests.cs # tests/TickerQ.Tests/TickerOptionsBuilderTests.cs
Collaborator
Author
Sync DetailsExcluded files restored from
|
| File | Property | Change |
|---|---|---|
src/Directory.Build.props |
Version |
10.3.0 -> 9.3.0 |
src/Directory.Build.props |
TargetFramework |
net10.0 -> net9.0 |
src/Directory.Build.props |
DotNetVersion |
[10.0.0,11.0.0) -> [9.0.0,10.0.0) |
Change _serviceProvider from private to protected in BasePersistenceProvider to match main branch. Required by TickerEFCorePersistenceProvider which accesses it for the new ITickerQueryable methods. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Automated Branch Sync
This PR merges recent changes from
mainintonet9.Created automatically by branch sync workflow