Closed HollyWangUCLA closed 7 months ago
Hi @HollyWangUCLA
In your custom module you can implement jobs. They will be executed whenever cron executes.
There are two ways to do this using hook_cron
and using queue workers
.
For more information: https://api.drupal.org/api/drupal/core%21core.api.php/function/hook_cron/10 https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Annotation%21QueueWorker.php/class/QueueWorker/10
You can refer the below link for Background Developer Sync
functionality which is similar to your use-case:
"/admin/config/apigee-edge/developer-settings/sync
"
shishir-intelli, Yes, developer_app sync works similar as developer sync. We do have a custom module which implement cron job to pull products from Edge and generate new categories. Any clue on where can I locate developer_app sync code in Edge module?
Thank you so much
Hi @HollyWangUCLA
Any clue on where can I locate developer_app sync code in Edge module?
I am not sure what exactly you are looking for, we don't have developer_app
sync functionality in our module, It seems you have it in your custom module.
For developer sync you can refer : https://github.com/apigee/apigee-edge-drupal/blob/3.x/src/Job/DeveloperSync.php
I believe that this sync app field product function delivers with edge module admin/config/apigee-edge/app-settings/general/sync
It appears there is some confusion, Edge module doesn't include developer_app sync
functionality.
There is apigee_edge.settings.developer.sync:
but not developer_app sync
functionality.
Check here https://github.com/apigee/apigee-edge-drupal/blob/3.x/apigee_edge.routing.yml
Could you please share us the file link for developer_app sync
which you are referring to and the output of command composer show
to understand better.
Are you using Stratus Meridian Developer Portal or Stratus Meridian module?
Hope this issue is resolved. Closing this issue, feel free to re-open for any further help.
Is your feature request related to a problem? Please describe.
I have been manually run "Sync Field API Products" on a regular basis. If this task was skipped, the product list on the portal side will not display properly when project manager modified their products at the Apigee Edge side. The url to run this task is mysite/admin/config/apigee-edge/app-settings/general/sync
Screenshot:
Describe the solution you would like
With more developers joined Apigee edge and more products were created, this manual task became routine and takes longer time to complete (>20 minutes).
Is there any suggesting to automate this task? for example, is that possible for me to create a crontab task to trigger this sync on a daily basis? Or is that possible for a backend cron job created through custom php code?
Thank you so much. Any suggestion will be appreciated.