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

Ready: timer sample was failing on running worker #94

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

GSmithApps
Copy link
Contributor

@GSmithApps GSmithApps commented Jan 25, 2025

Fixing Timer Example

The timer example was failing when I ran dotnet run worker, so I just made small changes to get it running.

The error

$ dotnet run worker

/Users/grantsmith/forks/samples-dotnet/src/Timer/Subscription.workflow.cs(24,35): error CS0103: The name 'TemporalException' does not exist in the current context [/Users/grantsmith/forks/samples-dotnet/src/Timer/TemporalioSamples.Timer.csproj]
/Users/grantsmith/forks/samples-dotnet/src/Timer/MyActivities.cs(5,14): error CA1052: Type 'MyActivities' is a static holder type but is neither static nor NotInheritable (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1052) [/Users/grantsmith/forks/samples-dotnet/src/Timer/TemporalioSamples.Timer.csproj]

The build failed. Fix the build errors and run again.

The Fix

I just suppressed the message and added the exceptions import

@GSmithApps GSmithApps changed the title fix: timer sample was failing on running worker Ready: timer sample was failing on running worker Jan 25, 2025
Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! All looks good IMO.

@cretz cretz merged commit db6ce07 into temporalio:main Jan 27, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants