Drush integration
pounard - August 6, 2009 - 13:53
| Project: | DataSync |
| Version: | 6.x-1.0-alpha3 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Hi again!
I'm actually trying to do a Drush integration for DataSync, is the API stable enough to do it?
I need this because I'm doing intensive testing of some other modules using DataSync, and clicking everywhere in Drupal like I do is really something anyone should live.
If you are interested I'll send it here.
The fact I'm creating the thread to ask this question:
What DataSync functions I could implement in Drush (else than 'list/add/remove job', 'activate/list type', 'list/add/remove host') ?

#1
Definitely interested. The best way to do this would be to make a datasync_drush module that depends on DataSync and that can be disabled independently of the main datasync module. It would be your choice to decide whether it should depend or integrate with datasync_scheduler.
You actually should probably make a separate project for this (like datasync_feedapi) because I don't have enough experience with drush to maintain this in the long term. I will point to your project from the main datasync page and offer any help you need.
You should look at the job class for a bunch of methods you could implement: add, advance_phase, complete_phase, do_phase, fail_phase, postpone_phase, remove, take. I guess it depends if you want it to integrate deeply with datasync_scheduler or just datasync.
Let me know how it goes.
#2
Drush integration is only one .inc file, just see what I started. I think it should be attached to your project.
I can maintain it until I work with DataSync, just enough time for other people to get interested.
See attached file, renamed .txt because of ugly extension limitation.
#3
Ho, and right now the code is quite basic, it does not handle much, just what I needed! :D
I will complete it as much as time allows me to.
I'm not into supporting scheduler right now, but I think I will pretty soon because I'll have to schedule daily tasks.
#4
I would really prefer if this was a separate module (even if it is included in the main datasync package). That way people can feel comfortable that it will not be used at all if it is unchecked on the modules page (I did the same thing for datasync_scheduler and datasync_cronalt). Can you turn this into a datasync_drush.module file? I believe all you'd have to do is rename the file and change every instance of datasync_ to datasync_drush_
#5
Ok, can do it. But there is no need to create a module, it will only be a new function namespace within the file, Drush integration does not need to be into a module (in fact, it never is into a module).
#6
Ok, can do it. But there is no need to create a module, it will only be a new function namespace within the file, Drush integration does not need to be into a module (in fact, it never is into a module).