@@ -135,7 +135,8 @@ defmodule Sentry.Integrations.Oban.CronTest do
135
135
"type" => "interval" ,
136
136
"value" => 1 ,
137
137
"unit" => unquote ( expected_unit )
138
- }
138
+ } ,
139
+ "timezone" => "Europe/Rome"
139
140
}
140
141
141
142
send ( test_pid , { ref , :done } )
@@ -150,7 +151,7 @@ defmodule Sentry.Integrations.Oban.CronTest do
150
151
job: % Oban.Job {
151
152
worker: "Sentry.MyWorker" ,
152
153
id: 942 ,
153
- meta: % { "cron" => true , "cron_expr" => unquote ( frequency ) }
154
+ meta: % { "cron" => true , "cron_expr" => unquote ( frequency ) , "cron_tz" => "Europe/Rome" }
154
155
}
155
156
} )
156
157
@@ -179,7 +180,8 @@ defmodule Sentry.Integrations.Oban.CronTest do
179
180
"schedule" => % {
180
181
"type" => "crontab" ,
181
182
"value" => "* 1 1 1 1"
182
- }
183
+ } ,
184
+ "timezone" => "Europe/Rome"
183
185
}
184
186
185
187
send ( test_pid , { ref , :done } )
@@ -194,7 +196,7 @@ defmodule Sentry.Integrations.Oban.CronTest do
194
196
job: % Oban.Job {
195
197
worker: "Sentry.MyWorker" ,
196
198
id: 942 ,
197
- meta: % { "cron" => true , "cron_expr" => "* 1 1 1 1" }
199
+ meta: % { "cron" => true , "cron_expr" => "* 1 1 1 1" , "cron_tz" => "Europe/Rome" }
198
200
}
199
201
} )
200
202
@@ -226,7 +228,8 @@ defmodule Sentry.Integrations.Oban.CronTest do
226
228
"schedule" => % {
227
229
"type" => "crontab" ,
228
230
"value" => "* 1 1 1 1"
229
- }
231
+ } ,
232
+ "timezone" => "Europe/Rome"
230
233
}
231
234
232
235
send ( test_pid , { ref , :done } )
@@ -239,7 +242,7 @@ defmodule Sentry.Integrations.Oban.CronTest do
239
242
job: % Oban.Job {
240
243
worker: "Sentry.MyWorker" ,
241
244
id: 942 ,
242
- meta: % { "cron" => true , "cron_expr" => "* 1 1 1 1" }
245
+ meta: % { "cron" => true , "cron_expr" => "* 1 1 1 1" , "cron_tz" => "Europe/Rome" }
243
246
}
244
247
} )
245
248
@@ -265,7 +268,7 @@ defmodule Sentry.Integrations.Oban.CronTest do
265
268
job: % Oban.Job {
266
269
worker: "Sentry.MyWorker" ,
267
270
id: 123 ,
268
- meta: % { "cron" => true , "cron_expr" => "@daily" }
271
+ meta: % { "cron" => true , "cron_expr" => "@daily" , "cron_tz" => "Europe/Rome" }
269
272
}
270
273
} )
271
274
@@ -293,14 +296,14 @@ defmodule Sentry.Integrations.Oban.CronTest do
293
296
worker: "Sentry.ClientWorker" ,
294
297
id: 123 ,
295
298
args: % { "client" => client_name } ,
296
- meta: % { "cron" => true , "cron_expr" => "@daily" }
299
+ meta: % { "cron" => true , "cron_expr" => "@daily" , "cron_tz" => "Europe/Rome" }
297
300
}
298
301
} )
299
302
300
303
assert_receive { ^ ref , :done } , 1000
301
304
end
302
305
303
- test "custom options" , % { bypass: bypass } do
306
+ test "custom options overide job metadata " , % { bypass: bypass } do
304
307
test_pid = self ( )
305
308
ref = make_ref ( )
306
309
@@ -339,7 +342,7 @@ defmodule Sentry.Integrations.Oban.CronTest do
339
342
worker: inspect ( WorkerWithCustomOptions ) ,
340
343
id: 123 ,
341
344
args: % { } ,
342
- meta: % { "cron" => true , "cron_expr" => "@daily" }
345
+ meta: % { "cron" => true , "cron_expr" => "@daily" , "cron_tz" => "America/Chicago" }
343
346
}
344
347
} )
345
348
0 commit comments