43 lines
996 B
Python
43 lines
996 B
Python
app_name = "cloud_portal"
|
|
app_title = "Cloud Portal"
|
|
app_publisher = "Jey ERP"
|
|
app_description = "Cloud Portal"
|
|
app_email = "ibo131205@gmail.com"
|
|
app_license = "mit"
|
|
|
|
# Website Routes
|
|
website_route_rules = [
|
|
{"from_route": "/portal/<path:app_path>", "to_route": "portal"},
|
|
]
|
|
|
|
# DocType Event Hooks
|
|
doc_events = {
|
|
"Customer": {
|
|
"after_insert": "cloud_portal.api.erpnext_sync.on_customer_insert",
|
|
},
|
|
"Subscription": {
|
|
"after_insert": "cloud_portal.api.erpnext_sync.on_subscription_insert",
|
|
},
|
|
}
|
|
|
|
fixtures = [
|
|
{
|
|
"dt": "Custom Field",
|
|
"filters": [["dt", "=", "Subscription"], ["fieldname", "=", "custom_remote_sub_id"]],
|
|
}
|
|
]
|
|
|
|
# Scheduled Tasks
|
|
scheduler_events = {
|
|
"cron": {
|
|
# Sync container statuses every minute
|
|
"* * * * *": [
|
|
"cloud_portal.cloud_portal.doctype.cloud_container.cloud_container.sync_all_container_statuses"
|
|
],
|
|
# Sync subscription statuses with remote ERPNext every hour
|
|
"0 * * * *": [
|
|
"cloud_portal.api.erpnext_sync.sync_all_subscriptions"
|
|
],
|
|
}
|
|
}
|