ymcatwincities/ymca_sync

There is no license information available for the latest version (10.0.6) of this package.

Syncer sceleton

Installs: 61 861

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 4

Forks: 4

Open Issues: 1

Type:drupal-module

10.0.6 2024-05-28 07:07 UTC

This package is auto-updated.

Last update: 2024-11-28 08:16:10 UTC


README

Provide uniform program interface for run drush commands without race condition

How to add new syncer

Add to your module_name.service.yml code like this:

  my_data.syncer:
    class: Drupal\ymca_sync\Syncer
    arguments: []
    calls:
      - [addStep, ['@my_service', 'my_method']]
      - [addStep, ['@my_another_service', 'my_another_method']]
    tags:
      - { name: syncer }

Clear cache. Go to /admin/config/system/ymca-sync and activate you syncer

How list syncers from command-line

run drush yn-sync:list

How to run your syncer

Run syncer by drush commands, for example:

drush yn-sync my_data.syncer

If your run syncer twice at the same time on second run you see message like this:

Lock syncer my_data.syncer is still working. Exit.