@@ -321,7 +321,7 @@ defmodule ConsumerSupervisor do
321
321
322
322
## Callbacks
323
323
324
- @ doc false
324
+ @ impl true
325
325
def init ( { mod , args , name } ) do
326
326
Process . put ( :"$initial_call" , { :supervisor , mod , 1 } )
327
327
Process . flag ( :trap_exit , true )
@@ -393,7 +393,7 @@ defmodule ConsumerSupervisor do
393
393
defp validate_seconds ( seconds ) when is_integer ( seconds ) , do: :ok
394
394
defp validate_seconds ( _ ) , do: { :error , "max_seconds must be an integer" }
395
395
396
- @ doc false
396
+ @ impl true
397
397
def handle_subscribe ( :producer , opts , { _ , ref } = from , state ) do
398
398
# GenStage checks these options before allowing susbcription
399
399
max = Keyword . get ( opts , :max_demand , 1000 )
@@ -402,12 +402,12 @@ defmodule ConsumerSupervisor do
402
402
{ :manual , put_in ( state . producers [ ref ] , { from , 0 , 0 , min , max } ) }
403
403
end
404
404
405
- @ doc false
405
+ @ impl true
406
406
def handle_cancel ( _ , { _ , ref } , state ) do
407
407
{ :noreply , [ ] , update_in ( state . producers , & Map . delete ( & 1 , ref ) ) }
408
408
end
409
409
410
- @ doc false
410
+ @ impl true
411
411
def handle_events ( events , { pid , ref } = from , state ) do
412
412
% { template: child , children: children } = state
413
413
{ new , errors } = start_events ( events , from , child , 0 , [ ] , state )
@@ -487,7 +487,7 @@ defmodule ConsumerSupervisor do
487
487
end
488
488
end
489
489
490
- @ doc false
490
+ @ impl true
491
491
def handle_call ( :which_children , _from , state ) do
492
492
% { children: children , template: child } = state
493
493
{ _ , _ , _ , _ , type , mods } = child
@@ -584,12 +584,12 @@ defmodule ConsumerSupervisor do
584
584
defp exit_reason ( :error , reason , stack ) , do: { reason , stack }
585
585
defp exit_reason ( :throw , value , stack ) , do: { { :nocatch , value } , stack }
586
586
587
- @ doc false
587
+ @ impl true
588
588
def handle_cast ( _msg , state ) do
589
589
{ :noreply , [ ] , state }
590
590
end
591
591
592
- @ doc false
592
+ @ impl true
593
593
def handle_info ( { :EXIT , pid , reason } , state ) do
594
594
case maybe_restart_child ( pid , reason , state ) do
595
595
{ :ok , state } -> { :noreply , [ ] , state }
@@ -625,7 +625,7 @@ defmodule ConsumerSupervisor do
625
625
{ :noreply , [ ] , state }
626
626
end
627
627
628
- @ doc false
628
+ @ impl true
629
629
def code_change ( _ , % { mod: mod , args: args } = state , _ ) do
630
630
case mod . init ( args ) do
631
631
{ :ok , children , opts } ->
@@ -648,7 +648,7 @@ defmodule ConsumerSupervisor do
648
648
end
649
649
end
650
650
651
- @ doc false
651
+ @ impl true
652
652
def terminate ( _ , % { children: children } = state ) do
653
653
:ok = terminate_children ( children , state )
654
654
end
@@ -906,6 +906,7 @@ defmodule ConsumerSupervisor do
906
906
]
907
907
end
908
908
909
+ @ impl true
909
910
def format_status ( :terminate , [ _pdict , state ] ) do
910
911
state
911
912
end
0 commit comments