Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ymcatwincities/ymca_sync
Syncer for Open Y and not only
https://github.com/ymcatwincities/ymca_sync
drush-commands openy openy-decoupled ymca-sync
Last synced: 28 days ago
JSON representation
Syncer for Open Y and not only
- Host: GitHub
- URL: https://github.com/ymcatwincities/ymca_sync
- Owner: ymcatwincities
- Created: 2021-02-04T13:04:54.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T07:08:38.000Z (7 months ago)
- Last Synced: 2024-11-12T21:20:00.518Z (about 2 months ago)
- Topics: drush-commands, openy, openy-decoupled, ymca-sync
- Language: PHP
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# YMCA Sync module
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:
```yaml
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:
```sh
drush yn-sync my_data.syncer
```
If your run syncer twice at the same time on second run you see message like this:
```sh
Lock syncer my_data.syncer is still working. Exit.
```