Skip to content

Disable the legacy GIVeconomy power sync cron#2315

Open
ae2079 wants to merge 1 commit into
stagingfrom
chore/disable-giveconomy-power-sync
Open

Disable the legacy GIVeconomy power sync cron#2315
ae2079 wants to merge 1 commit into
stagingfrom
chore/disable-giveconomy-power-sync

Conversation

@ae2079
Copy link
Copy Markdown
Collaborator

@ae2079 ae2079 commented Apr 22, 2026

Issue

Summary

Stop the legacy impact-graph service from continuing to poll GIVeconomy for power updates once the new service becomes the source of truth. This makes the power cutover one-directional and keeps the old backend from reintroducing mirrored state after deployment.

Changes

  • add a configuration guard that disables the GIVeconomy power sync cron unless DISABLE_GIVECONOMY_POWER_SYNC_JOB=false is set explicitly
  • leave the existing URL/password validation in place for any intentional manual re-enable during rollback testing

How to Test

  1. Run npx eslint "src/services/cronJobs/syncGiveconomyPowerEvents.ts".
  2. Start the old backend with its usual env and verify the GIVeconomy sync cron no longer schedules by default.
  3. If rollback testing is needed, set DISABLE_GIVECONOMY_POWER_SYNC_JOB=false and confirm the cron can still be re-enabled intentionally.

Made with Cursor

Summary by CodeRabbit

  • New Features
    • Added environment-based configuration option to disable the Giveconomy Power synchronization job through simple configuration. When disabled, the job logs its status and exits gracefully without processing, providing operational flexibility and control over synchronization behavior without requiring code modifications.

Default the impact-graph pull job to off so the old backend stops mirroring power changes once GIVeconomy becomes the source of truth.

Made-with: Cursor
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 09b32cb1-97c3-45e0-b111-0650f0278b75

📥 Commits

Reviewing files that changed from the base of the PR and between ec22f59 and 0836170.

📒 Files selected for processing (1)
  • src/services/cronJobs/syncGiveconomyPowerEvents.ts

Walkthrough

Added an environment variable-based early-exit gate to the runGiveconomyPowerSyncCronJob function. When the DISABLE_GIVECONOMY_POWER_SYNC_JOB environment variable is not set to 'false', the function logs a configuration message and returns without further execution.

Changes

Cohort / File(s) Summary
Configuration-based Early Exit
src/services/cronJobs/syncGiveconomyPowerEvents.ts
Added environment variable check to conditionally disable the Giveconomy Power sync cron job at startup; existing validation and scheduling logic remains intact.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Suggested reviewers

  • RamRamez

Poem

🐰 A gate now stands at the cron job's start,
With env flags playing their part,
When DISABLE whispers, "not false, my friend,"
The sync does bow and gracefully end! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: disabling the legacy GIVeconomy power sync cron job, which aligns with the changeset modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/disable-giveconomy-power-sync

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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