summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/backup.rake6
-rw-r--r--lib/tasks/csv_user_import.rake (renamed from lib/tasks/cvs_user_import.rake)0
-rw-r--r--lib/tasks/gs_cluster.rake8
3 files changed, 12 insertions, 2 deletions
diff --git a/lib/tasks/backup.rake b/lib/tasks/backup.rake
new file mode 100644
index 0000000..c285e1f
--- /dev/null
+++ b/lib/tasks/backup.rake
@@ -0,0 +1,6 @@
+namespace :backup do
+ desc "Backup the system"
+ task :daily_backup => :environment do
+ # This would be the daily backup.
+ end
+end \ No newline at end of file
diff --git a/lib/tasks/cvs_user_import.rake b/lib/tasks/csv_user_import.rake
index 81959d5..81959d5 100644
--- a/lib/tasks/cvs_user_import.rake
+++ b/lib/tasks/csv_user_import.rake
diff --git a/lib/tasks/gs_cluster.rake b/lib/tasks/gs_cluster.rake
index 7b49ebb..c248c32 100644
--- a/lib/tasks/gs_cluster.rake
+++ b/lib/tasks/gs_cluster.rake
@@ -201,10 +201,14 @@ namespace :gs_cluster do
remote_objects(remote_site, local_node_id, last_sync, Softkey).each do |remote_object|
attributes = make_hash(remote_object.attributes)
attributes[:sip_account_id] = SipAccount.where(:uuid => attributes[:sip_account_uuid]).first.try(:id)
- attributes[:call_forward_id] = CallForward.where(:uuid => attributes[:call_forward_uuid]).first.try(:id)
+
+ if ! attributes[:softkeyable_uuid].blank?
+ attributes[:softkeyable_id] = attributes[:softkeyable_type].constantize.where(:uuid => attributes[:softkeyable_uuid]).first.try(:id)
+ end
+
attributes[:softkey_function_id] = SoftkeyFunction.where(:name => attributes[:function]).first.try(:id)
attributes.delete(:sip_account_uuid)
- attributes.delete(:call_forward_uuid)
+ attributes.delete(:softkeyable_uuid)
attributes.delete(:softkey_function)
process_object(Softkey, Softkey, Softkey.where(:uuid => attributes[:uuid]).first, attributes)
end