sf_migrate 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mailer.rb +12 -12
- metadata +1 -1
data/lib/mailer.rb
CHANGED
@@ -6,25 +6,25 @@ module SalesforceMigration
|
|
6
6
|
|
7
7
|
def initialize(options)
|
8
8
|
@@config = YAML.load_file(options[:config_file])
|
9
|
-
|
9
|
+
@logger = SalesforceMigration::Runner::create_logger
|
10
10
|
|
11
11
|
# Ugly way to fix the bug with user_hash update
|
12
12
|
# We set up a connection and update it manually.update_attributes does not work.
|
13
13
|
# The issue is forwarded to sugarcrm gem crew
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
14
|
+
ActiveRecord::Base.establish_connection(
|
15
|
+
:adapter => @@config['db_type'],
|
16
|
+
:host => "localhost",
|
17
|
+
:username => @@config['db_user'],
|
18
|
+
:password => @@config['db_password'],
|
19
|
+
:database => @@config['db_database']
|
20
|
+
)
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
@logger.info("Starting the mailer")
|
23
|
+
start
|
24
|
+
@logger.info("Mailer finished")
|
25
25
|
end
|
26
26
|
|
27
|
-
|
27
|
+
private
|
28
28
|
|
29
29
|
#Search the agent portal database for all users, who are inactive
|
30
30
|
#This is the script, that activates them
|