Skip to content

refactor: remove dead instrumented cron scheduler block in main - #375

Open
mrofreP wants to merge 1 commit into
UndernetIRC:masterfrom
mrofreP:refactor/remove-dead-instrumented-cron-scheduler
Open

mrofreP wants to merge 1 commit into
UndernetIRC:masterfrom
mrofreP:refactor/remove-dead-instrumented-cron-scheduler

Conversation

@mrofreP

@mrofreP mrofreP commented Jul 18, 2026

Copy link
Copy Markdown

The block at cmd/cservice-api/main.go:398-416 created an
InstrumentedScheduler and immediately discarded it via
_ = instrumentedScheduler with an inline comment saying "Prevent
unused variable error". The preceding log line ("Instrumented cron
scheduler created (integration pending)") and the block comment
("We would need to modify the cron.Service to accept an
instrumented scheduler") both acknowledged the block does nothing
useful.

Users were getting the non-instrumented scheduler either way (via
cronService.SetupPasswordResetCleanup a few lines below), so the
block was a misleading no-op that hinted at capabilities the service
does not actually provide.

Delete the block. If genuine instrumentation integration is desired
later, it should be added by wiring an instrumented scheduler into
cron.Service.SetupPasswordResetCleanup, not by re-adding dead
scaffolding here.

The block at cmd/cservice-api/main.go:398-416 created an
InstrumentedScheduler and immediately discarded it via
_ = instrumentedScheduler with an inline comment saying "Prevent
unused variable error". The preceding log line ("Instrumented cron
scheduler created (integration pending)") and the block comment
("We would need to modify the cron.Service to accept an
instrumented scheduler") both acknowledged the block does nothing
useful.

Users were getting the non-instrumented scheduler either way (via
cronService.SetupPasswordResetCleanup a few lines below), so the
block was a misleading no-op that hinted at capabilities the service
does not actually provide.

Delete the block. If genuine instrumentation integration is desired
later, it should be added by wiring an instrumented scheduler into
cron.Service.SetupPasswordResetCleanup, not by re-adding dead
scaffolding here.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

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.

1 participant