File tree Expand file tree Collapse file tree
sentry-rails/spec/active_job/support Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 end
2121
2222 def boot_adapter ( adapter )
23- case adapter
24- when :solid_queue
25- Sentry ::Rails ::Test ::Application . load_queue_schema
26- end
2723 end
2824
2925 def reset_adapter ( adapter )
30- case adapter
31- when :solid_queue
32- [
33- SolidQueue ::ReadyExecution ,
34- SolidQueue ::ClaimedExecution ,
35- SolidQueue ::FailedExecution ,
36- SolidQueue ::BlockedExecution ,
37- SolidQueue ::ScheduledExecution ,
38- SolidQueue ::RecurringExecution ,
39- SolidQueue ::Process ,
40- SolidQueue ::Job
41- ] . each ( &:delete_all )
42- end
4326 end
4427
4528 def drain ( at : nil )
@@ -55,14 +38,6 @@ def drain(at: nil)
5538 kwargs = at ? { at : at } : { }
5639 perform_enqueued_jobs ( **kwargs )
5740 end
58- when :solid_queue
59- process = SolidQueue ::Process . register (
60- kind : "Worker" ,
61- pid : ::Process . pid ,
62- name : "spec-#{ SecureRandom . hex ( 4 ) } "
63- )
64-
65- SolidQueue ::ReadyExecution . claim ( "*" , 100 , process . id ) . each ( &:perform )
6641 else
6742 raise NotImplementedError , "active_job backend harness has no drain strategy for adapter: #{ adapter . inspect } "
6843 end
You can’t perform that action at this time.
0 commit comments