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

feat(lit-task-auto-top-up): Update worker to support 1-task-per-network on a single mongodb backend task tracking instance #5

Merged
merged 4 commits into from
Jul 11, 2024

Conversation

MaximusHaximus
Copy link
Contributor

@MaximusHaximus MaximusHaximus commented Jun 28, 2024

With this PR, we can run multiple worker instances (1 per network), but persist their jobs to a single backend Mongo instance without issue.

  • Updated the lit auto-top-up worker definition to register a network-specific daily task job name for Agenda.
  • Added a new recipient_list_manzano.json file in the worker directory, which our new manzano instance can be configured via env var to load.
  • Duplicated the existing recipient_list.json file in the worker directory, which was habanero specific. The new file includes habanero in the same for consistency. Once this is merged and the existing worker is updated to reference the new filename with habanero in it, we can delete the existing generically named recipient_list.json file.
  • Modified entries for 0x9f32f6555a117ac137775973C6856bC52c249C80 in all 3 files -- this address is a 'stub' address that I use as a canary for the job/worker; it is a wallet that I created. It was set to mint every 5 days. I changed it to mint every 20 instead.

Copy link

@Ansonhkg Ansonhkg left a comment

Choose a reason for hiding this comment

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

Nice!

@Ansonhkg Ansonhkg self-requested a review July 2, 2024 20:42
Copy link

@Ansonhkg Ansonhkg left a comment

Choose a reason for hiding this comment

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

Nooice! Love the use of recipientDetailSchema zod schema!


z.array(recipientDetailSchema).parse(recipientList);
z.array(recipientDetailSchema).parse(deprecatedHabaneroRecipientList);
z.array(recipientDetailSchema).parse(habanberoRecipientList);
Copy link

Choose a reason for hiding this comment

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

nice!

…to register network-specific daily task job name for Agenda

- Now, we can run multiple worker instances (1 per network), but persist their jobs to a single backend Mongo instance without issue
…no-specific recipient list files in worker dir
@MaximusHaximus MaximusHaximus force-pushed the network-specific-autotopup branch from b64375c to 58861f6 Compare July 10, 2024 20:59
@MaximusHaximus
Copy link
Contributor Author

MaximusHaximus commented Jul 10, 2024

Rebased and synced contents of recipient_list_habanero.json with recipient_list.json as one new recipient was added after this PR was created.

Also bumped contracts-sdk to v6.1.0 to ensure we're using the latest changes re: setting gasLimit for mint tx's
Thanks @Ansonhkg <3 :)

@MaximusHaximus MaximusHaximus merged commit c6427d7 into main Jul 11, 2024
2 checks passed
@MaximusHaximus MaximusHaximus deleted the network-specific-autotopup branch July 11, 2024 17:10
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